From c319cc5ab5064459aaf803ee719a08e9663726ea Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 6 Oct 2016 13:45:45 +0200 Subject: Make environments to be close able --- db/migrate/20161006104309_add_state_to_environment.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'db/migrate') 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 -- cgit v1.2.1