diff options
author | Felipe Artur <fcardozo@gitlab.com> | 2019-08-30 14:28:20 +0300 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2019-08-30 14:28:20 +0300 |
commit | 0f59d73ef2f65aba791b6738a5e705fe1a8da789 (patch) | |
tree | c055c380314058af90bf76fb8208fd71f607f830 /db/migrate/20190822175441_rename_epics_state_to_state_id.rb | |
parent | c965625833c45db84d564da818f580505dc0a1b6 (diff) |
Rename epic column state to state_id
Rename epic column state to state_id to be consistent with
issues and merge requests
Diffstat (limited to 'db/migrate/20190822175441_rename_epics_state_to_state_id.rb')
-rw-r--r-- | db/migrate/20190822175441_rename_epics_state_to_state_id.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20190822175441_rename_epics_state_to_state_id.rb b/db/migrate/20190822175441_rename_epics_state_to_state_id.rb new file mode 100644 index 00000000000..7f40d164a8e --- /dev/null +++ b/db/migrate/20190822175441_rename_epics_state_to_state_id.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class RenameEpicsStateToStateId < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + rename_column_concurrently :epics, :state, :state_id + end + + def down + cleanup_concurrent_column_rename :epics, :state_id, :state + end +end |