diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-02 10:22:56 +0100 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-02 10:22:56 +0100 |
commit | ddfd09c09cb904529df567e5606d76c467ed856f (patch) | |
tree | d17a48cf08e580cac866417700ea1ffe74c48bd7 /db/migrate | |
parent | 52c4a7866ed010d8db67e5ca976d8c73d4084784 (diff) | |
parent | 3b3f0fab452fb9cbe4fbe7f75112bef3a7f9d039 (diff) | |
download | gitlab-ce-ddfd09c09cb904529df567e5606d76c467ed856f.tar.gz |
Merge branch 'master' into zj-create-mattermost-team
Diffstat (limited to 'db/migrate')
5 files changed, 82 insertions, 0 deletions
diff --git a/db/migrate/20160610201627_migrate_users_notification_level.rb b/db/migrate/20160610201627_migrate_users_notification_level.rb index ce4f00e25fa..cd8b505de9f 100644 --- a/db/migrate/20160610201627_migrate_users_notification_level.rb +++ b/db/migrate/20160610201627_migrate_users_notification_level.rb @@ -1,4 +1,6 @@ class MigrateUsersNotificationLevel < ActiveRecord::Migration + DOWNTIME = false + # Migrates only users who changed their default notification level :participating # creating a new record on notification settings table diff --git a/db/migrate/20170206115204_add_column_ghost_to_users.rb b/db/migrate/20170206115204_add_column_ghost_to_users.rb new file mode 100644 index 00000000000..cc1eeda1160 --- /dev/null +++ b/db/migrate/20170206115204_add_column_ghost_to_users.rb @@ -0,0 +1,11 @@ +class AddColumnGhostToUsers < ActiveRecord::Migration + DOWNTIME = false + + def up + add_column :users, :ghost, :boolean + end + + def down + remove_column :users, :ghost + end +end diff --git a/db/migrate/20170214084746_add_default_artifacts_expiration_to_application_settings.rb b/db/migrate/20170214084746_add_default_artifacts_expiration_to_application_settings.rb new file mode 100644 index 00000000000..e0e3ff8957a --- /dev/null +++ b/db/migrate/20170214084746_add_default_artifacts_expiration_to_application_settings.rb @@ -0,0 +1,11 @@ +class AddDefaultArtifactsExpirationToApplicationSettings < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + add_column :application_settings, + :default_artifacts_expire_in, :string, + null: false, default: '0' + end +end diff --git a/db/migrate/20170217132157_rename_merge_when_build_succeeds.rb b/db/migrate/20170217132157_rename_merge_when_build_succeeds.rb new file mode 100644 index 00000000000..9011526565d --- /dev/null +++ b/db/migrate/20170217132157_rename_merge_when_build_succeeds.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 RenameMergeWhenBuildSucceeds < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = true + + # 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 = 'Renaming the column merge_when_build_succeeds' + + # 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 + rename_column :merge_requests, :merge_when_build_succeeds, :merge_when_pipeline_succeeds + end +end diff --git a/db/migrate/20170217151947_rename_only_allow_merge_if_build_succeeds.rb b/db/migrate/20170217151947_rename_only_allow_merge_if_build_succeeds.rb new file mode 100644 index 00000000000..b2b68ff72d1 --- /dev/null +++ b/db/migrate/20170217151947_rename_only_allow_merge_if_build_succeeds.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 RenameOnlyAllowMergeIfBuildSucceeds < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = true + + # 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 = 'Renaming the column only_allow_merge_if_build_succeeds' + + # 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 + rename_column :projects, :only_allow_merge_if_build_succeeds, :only_allow_merge_if_pipeline_succeeds + end +end |