summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-10-06 13:45:45 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-10-06 13:45:45 +0200
commitc319cc5ab5064459aaf803ee719a08e9663726ea (patch)
treeaa9a89d332a14bb3db668a73a9865dfe2b7742a6 /db/migrate
parentfd4e0703e81de31aaabdfc983b013382841fcaa3 (diff)
downloadgitlab-ce-c319cc5ab5064459aaf803ee719a08e9663726ea.tar.gz
Make environments to be close able
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20161006104309_add_state_to_environment.rb10
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