We have no way to explicitly provide segment rule order to the API when creating/updating them, nor any ordering defined when selecting them.
We should:
- Add a numeric
Rule.priority model field
- Expose it in the API in a backwards-compatible way:
- Add default
ordering = ["priority"] model setting
- Assume condition ids as priority values if no explicit
"priority" keys offered in the mutating API requests.
I don't yet know how to reliably assume default values for the new field in a migration. We should test with current data/queries to come up with a path forward.
We have no way to explicitly provide segment rule order to the API when creating/updating them, nor any ordering defined when selecting them.
We should:
Rule.prioritymodel fieldordering = ["priority"]model setting"priority"keys offered in the mutating API requests.I don't yet know how to reliably assume default values for the new field in a migration. We should test with current data/queries to come up with a path forward.