[go: up one dir, main page]

Change state to integer for issuables - Release 1

In https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7302 we added state field to epics and we used integer for it (using enum in the model). Merge Requests and Issues use string. We should switch to integers for these 2 as well.

We use state_machine for MRs and Issues that does not work nicely with enums. We could either introduce a new concern (especially Issues and Epics states are same) or use another gem (eg. https://github.com/aasm/aasm)

obs: This task will be made in two releases, here is the schedule:

First release 11.10: This issue

  1. Add a state_id column to issues and merge requests tables

  2. Schedule a background migration that will populate state_id column with new values

Second release 11.12: https://gitlab.com/gitlab-org/gitlab-ce/issues/61301

  1. Adds new indexes to state_id column

  2. Add the code which uses the new state_id column

  3. Removes old state column with a post deployment migration

Third release(OPTIONAL)

  1. Rename state_id column state
Edited by Felipe Cardozo