diff options
Diffstat (limited to 'db/migrate/20161006104309_add_state_to_environment.rb')
-rw-r--r-- | db/migrate/20161006104309_add_state_to_environment.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/db/migrate/20161006104309_add_state_to_environment.rb b/db/migrate/20161006104309_add_state_to_environment.rb index 2a6fd1a6a93..83dff07069f 100644 --- a/db/migrate/20161006104309_add_state_to_environment.rb +++ b/db/migrate/20161006104309_add_state_to_environment.rb @@ -1,9 +1,15 @@ class AddStateToEnvironment < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers + disable_ddl_transaction! + DOWNTIME = false - def change - add_column :environments, :state, :string + def up + add_column_with_default(:environments, :state, :string, default: :opened) + end + + def down + remove_column(:environments, :state) end end |