diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-10-17 12:45:31 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-10-17 12:45:31 +0200 |
commit | 6cdbb27ec3cf72ce6728986909aa3df54b7a26c6 (patch) | |
tree | b989b826e119a382e1bc0fde590e312c8d3bbcda /db/migrate | |
parent | 7aea16b64624eb681a1c134759a8f4fa1e5b2a78 (diff) | |
download | gitlab-ce-6cdbb27ec3cf72ce6728986909aa3df54b7a26c6.tar.gz |
Refactor code to use available and stopped statuses and refactor views to use separate renders
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20161006104309_add_state_to_environment.rb | 2 | ||||
-rw-r--r-- | db/migrate/20161017095000_add_properties_to_deployment.rb | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/db/migrate/20161006104309_add_state_to_environment.rb b/db/migrate/20161006104309_add_state_to_environment.rb index 83dff07069f..ccb546654f9 100644 --- a/db/migrate/20161006104309_add_state_to_environment.rb +++ b/db/migrate/20161006104309_add_state_to_environment.rb @@ -6,7 +6,7 @@ class AddStateToEnvironment < ActiveRecord::Migration DOWNTIME = false def up - add_column_with_default(:environments, :state, :string, default: :opened) + add_column_with_default(:environments, :state, :string, default: :available) end def down diff --git a/db/migrate/20161017095000_add_properties_to_deployment.rb b/db/migrate/20161017095000_add_properties_to_deployment.rb new file mode 100644 index 00000000000..6371166a4d2 --- /dev/null +++ b/db/migrate/20161017095000_add_properties_to_deployment.rb @@ -0,0 +1,29 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddPropertiesToDeployment < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + # When a migration requires downtime you **must** uncomment the following + # constant and define a short and easy to understand explanation as to why the + # migration requires downtime. + # DOWNTIME_REASON = '' + + # When using the methods "add_concurrent_index" or "add_column_with_default" + # you must disable the use of transactions as these methods can not run in an + # existing transaction. When using "add_concurrent_index" make sure that this + # method is the _only_ method called in the migration, any other changes + # should go in a separate migration. This ensures that upon failure _only_ the + # index creation fails and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + add_column :deployments, :properties, :text + end +end |