Flagsmith / Flagsmith/flagsmith
Stop using the SegmentRule and Condition models
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 567
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 121
Description
Migrate the last segment rule/condition readers (release pipeline, organisation export) onto `Segment.rules_data` and stop writing rows. Leave the models so historical segments can still be read, and mark them as deprecated.
### Acceptance criteria
- `SegmentRule` and `Condition` are clearly marked as deprecated.
- Creating or updating a segment writes no `SegmentRule` or `Condition` rows.
- The release-pipeline phased-rollout percentage is read correctly from `rules_data`.
- An organisation import produces `rules_data` and no `SegmentRule` and `Condition` rows.
- The OpenAPI schema does not rely on the `SegmentRule` model.
- The ordering settings are gone and no test depends on them.
- The newly introduced `Segment.rules_data` is renamed to `Segment.rules` — rules naturally flow from the serialiser into the model.
Contributor guide
Assessment
This issue has not been assessed yet.