diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-10-06 13:45:45 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-10-06 13:45:45 +0200 |
commit | c319cc5ab5064459aaf803ee719a08e9663726ea (patch) | |
tree | aa9a89d332a14bb3db668a73a9865dfe2b7742a6 /db | |
parent | fd4e0703e81de31aaabdfc983b013382841fcaa3 (diff) | |
download | gitlab-ce-c319cc5ab5064459aaf803ee719a08e9663726ea.tar.gz |
Make environments to be close able
Diffstat (limited to 'db')
-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 |