diff options
author | Valery Sizov <valery@gitlab.com> | 2017-10-09 07:19:14 +0000 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-10-09 07:19:14 +0000 |
commit | 22224279d511c7bdbe3a9206dd77b2df032cc972 (patch) | |
tree | 2ca39c7b22f28d0d7247619b98239d87c543438e | |
parent | c7f13eddaaae4e8de849523238aa74253b7ea9af (diff) | |
parent | f3e51d5415fa6ca2d34783d210e2631555f9a693 (diff) | |
download | gitlab-ce-rails5.tar.gz |
Merge branch 'rails5_fix_db_reset' into 'rails5'rails5
[Rails 5] Fix db:migrate:reset-mysql and db:migrate:reset-mysql
See merge request gitlab-org/gitlab-ce!14748
795 files changed, 848 insertions, 808 deletions
diff --git a/db/migrate/20121220064453_init_schema.rb b/db/migrate/20121220064453_init_schema.rb index f93dc92b70f..2fc55c035e0 100644 --- a/db/migrate/20121220064453_init_schema.rb +++ b/db/migrate/20121220064453_init_schema.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class InitSchema < ActiveRecord::Migration +class InitSchema < ActiveRecord::Migration[4.2] def up create_table "events", force: true do |t| diff --git a/db/migrate/20130102143055_rename_owner_to_creator_for_project.rb b/db/migrate/20130102143055_rename_owner_to_creator_for_project.rb index 84fd2060770..c9a684dedcc 100644 --- a/db/migrate/20130102143055_rename_owner_to_creator_for_project.rb +++ b/db/migrate/20130102143055_rename_owner_to_creator_for_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RenameOwnerToCreatorForProject < ActiveRecord::Migration +class RenameOwnerToCreatorForProject < ActiveRecord::Migration[4.2] def change rename_column :projects, :owner_id, :creator_id end diff --git a/db/migrate/20130110172407_add_public_to_project.rb b/db/migrate/20130110172407_add_public_to_project.rb index 4362aadcc1d..ef1ee0355df 100644 --- a/db/migrate/20130110172407_add_public_to_project.rb +++ b/db/migrate/20130110172407_add_public_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPublicToProject < ActiveRecord::Migration +class AddPublicToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :public, :boolean, default: false, null: false end diff --git a/db/migrate/20130123114545_add_issues_tracker_to_project.rb b/db/migrate/20130123114545_add_issues_tracker_to_project.rb index ba8c50b53e2..1306ac29b1c 100644 --- a/db/migrate/20130123114545_add_issues_tracker_to_project.rb +++ b/db/migrate/20130123114545_add_issues_tracker_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIssuesTrackerToProject < ActiveRecord::Migration +class AddIssuesTrackerToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :issues_tracker, :string, default: :gitlab, null: false end diff --git a/db/migrate/20130125090214_add_user_permissions.rb b/db/migrate/20130125090214_add_user_permissions.rb index 1350eadb60e..5d3ec4236fe 100644 --- a/db/migrate/20130125090214_add_user_permissions.rb +++ b/db/migrate/20130125090214_add_user_permissions.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddUserPermissions < ActiveRecord::Migration +class AddUserPermissions < ActiveRecord::Migration[4.2] def up add_column :users, :can_create_group, :boolean, default: true, null: false add_column :users, :can_create_team, :boolean, default: true, null: false diff --git a/db/migrate/20130131070232_remove_private_flag_from_project.rb b/db/migrate/20130131070232_remove_private_flag_from_project.rb index f0273ba448e..c98a5f5c6b4 100644 --- a/db/migrate/20130131070232_remove_private_flag_from_project.rb +++ b/db/migrate/20130131070232_remove_private_flag_from_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemovePrivateFlagFromProject < ActiveRecord::Migration +class RemovePrivateFlagFromProject < ActiveRecord::Migration[4.2] def up remove_column :projects, :private_flag end diff --git a/db/migrate/20130206084024_add_description_to_namsespace.rb b/db/migrate/20130206084024_add_description_to_namsespace.rb index 62676ce8914..e979851bbcf 100644 --- a/db/migrate/20130206084024_add_description_to_namsespace.rb +++ b/db/migrate/20130206084024_add_description_to_namsespace.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDescriptionToNamsespace < ActiveRecord::Migration +class AddDescriptionToNamsespace < ActiveRecord::Migration[4.2] def change add_column :namespaces, :description, :string, default: '', null: false end diff --git a/db/migrate/20130207104426_add_description_to_teams.rb b/db/migrate/20130207104426_add_description_to_teams.rb index bd9a4767b69..d8e216b6aba 100644 --- a/db/migrate/20130207104426_add_description_to_teams.rb +++ b/db/migrate/20130207104426_add_description_to_teams.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDescriptionToTeams < ActiveRecord::Migration +class AddDescriptionToTeams < ActiveRecord::Migration[4.2] def change add_column :user_teams, :description, :string, default: '', null: false end diff --git a/db/migrate/20130211085435_add_issues_tracker_id_to_project.rb b/db/migrate/20130211085435_add_issues_tracker_id_to_project.rb index 56b01cbf892..784826e0978 100644 --- a/db/migrate/20130211085435_add_issues_tracker_id_to_project.rb +++ b/db/migrate/20130211085435_add_issues_tracker_id_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIssuesTrackerIdToProject < ActiveRecord::Migration +class AddIssuesTrackerIdToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :issues_tracker_id, :string end diff --git a/db/migrate/20130214154045_rename_state_to_merge_status_in_milestone.rb b/db/migrate/20130214154045_rename_state_to_merge_status_in_milestone.rb index 4722cc13d4b..0742482567f 100644 --- a/db/migrate/20130214154045_rename_state_to_merge_status_in_milestone.rb +++ b/db/migrate/20130214154045_rename_state_to_merge_status_in_milestone.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RenameStateToMergeStatusInMilestone < ActiveRecord::Migration +class RenameStateToMergeStatusInMilestone < ActiveRecord::Migration[4.2] def change rename_column :merge_requests, :state, :merge_status end diff --git a/db/migrate/20130218140952_add_state_to_issue.rb b/db/migrate/20130218140952_add_state_to_issue.rb index 3a5e978a182..211f56b345b 100644 --- a/db/migrate/20130218140952_add_state_to_issue.rb +++ b/db/migrate/20130218140952_add_state_to_issue.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddStateToIssue < ActiveRecord::Migration +class AddStateToIssue < ActiveRecord::Migration[4.2] def change add_column :issues, :state, :string end diff --git a/db/migrate/20130218141038_add_state_to_merge_request.rb b/db/migrate/20130218141038_add_state_to_merge_request.rb index e0180c755e2..bec809ac945 100644 --- a/db/migrate/20130218141038_add_state_to_merge_request.rb +++ b/db/migrate/20130218141038_add_state_to_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddStateToMergeRequest < ActiveRecord::Migration +class AddStateToMergeRequest < ActiveRecord::Migration[4.2] def change add_column :merge_requests, :state, :string end diff --git a/db/migrate/20130218141117_add_state_to_milestone.rb b/db/migrate/20130218141117_add_state_to_milestone.rb index 5f71608692c..3912590613d 100644 --- a/db/migrate/20130218141117_add_state_to_milestone.rb +++ b/db/migrate/20130218141117_add_state_to_milestone.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddStateToMilestone < ActiveRecord::Migration +class AddStateToMilestone < ActiveRecord::Migration[4.2] def change add_column :milestones, :state, :string end diff --git a/db/migrate/20130218141258_convert_closed_to_state_in_issue.rb b/db/migrate/20130218141258_convert_closed_to_state_in_issue.rb index 67a0d3b53eb..68c5ce0b661 100644 --- a/db/migrate/20130218141258_convert_closed_to_state_in_issue.rb +++ b/db/migrate/20130218141258_convert_closed_to_state_in_issue.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ConvertClosedToStateInIssue < ActiveRecord::Migration +class ConvertClosedToStateInIssue < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20130218141327_convert_closed_to_state_in_merge_request.rb b/db/migrate/20130218141327_convert_closed_to_state_in_merge_request.rb index 307fc6a023d..35078f8f578 100644 --- a/db/migrate/20130218141327_convert_closed_to_state_in_merge_request.rb +++ b/db/migrate/20130218141327_convert_closed_to_state_in_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ConvertClosedToStateInMergeRequest < ActiveRecord::Migration +class ConvertClosedToStateInMergeRequest < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20130218141344_convert_closed_to_state_in_milestone.rb b/db/migrate/20130218141344_convert_closed_to_state_in_milestone.rb index d12703cf3b2..c5291623c56 100644 --- a/db/migrate/20130218141344_convert_closed_to_state_in_milestone.rb +++ b/db/migrate/20130218141344_convert_closed_to_state_in_milestone.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ConvertClosedToStateInMilestone < ActiveRecord::Migration +class ConvertClosedToStateInMilestone < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20130218141444_remove_merged_from_merge_request.rb b/db/migrate/20130218141444_remove_merged_from_merge_request.rb index afa5137061e..bb74df3f7bf 100644 --- a/db/migrate/20130218141444_remove_merged_from_merge_request.rb +++ b/db/migrate/20130218141444_remove_merged_from_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveMergedFromMergeRequest < ActiveRecord::Migration +class RemoveMergedFromMergeRequest < ActiveRecord::Migration[4.2] def up remove_column :merge_requests, :merged end diff --git a/db/migrate/20130218141507_remove_closed_from_issue.rb b/db/migrate/20130218141507_remove_closed_from_issue.rb index f250288bc3b..8712a3038ae 100644 --- a/db/migrate/20130218141507_remove_closed_from_issue.rb +++ b/db/migrate/20130218141507_remove_closed_from_issue.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveClosedFromIssue < ActiveRecord::Migration +class RemoveClosedFromIssue < ActiveRecord::Migration[4.2] def up remove_column :issues, :closed end diff --git a/db/migrate/20130218141536_remove_closed_from_merge_request.rb b/db/migrate/20130218141536_remove_closed_from_merge_request.rb index efa12e32636..32b63a308f9 100644 --- a/db/migrate/20130218141536_remove_closed_from_merge_request.rb +++ b/db/migrate/20130218141536_remove_closed_from_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveClosedFromMergeRequest < ActiveRecord::Migration +class RemoveClosedFromMergeRequest < ActiveRecord::Migration[4.2] def up remove_column :merge_requests, :closed end diff --git a/db/migrate/20130218141554_remove_closed_from_milestone.rb b/db/migrate/20130218141554_remove_closed_from_milestone.rb index 75ac14e43be..fde60fb45ba 100644 --- a/db/migrate/20130218141554_remove_closed_from_milestone.rb +++ b/db/migrate/20130218141554_remove_closed_from_milestone.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveClosedFromMilestone < ActiveRecord::Migration +class RemoveClosedFromMilestone < ActiveRecord::Migration[4.2] def up remove_column :milestones, :closed end diff --git a/db/migrate/20130220124204_add_new_merge_status_to_merge_request.rb b/db/migrate/20130220124204_add_new_merge_status_to_merge_request.rb index 97615e47c89..58da30a37b3 100644 --- a/db/migrate/20130220124204_add_new_merge_status_to_merge_request.rb +++ b/db/migrate/20130220124204_add_new_merge_status_to_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNewMergeStatusToMergeRequest < ActiveRecord::Migration +class AddNewMergeStatusToMergeRequest < ActiveRecord::Migration[4.2] def change add_column :merge_requests, :new_merge_status, :string end diff --git a/db/migrate/20130220125544_convert_merge_status_in_merge_request.rb b/db/migrate/20130220125544_convert_merge_status_in_merge_request.rb index 3b8c3686c55..4792c77386b 100644 --- a/db/migrate/20130220125544_convert_merge_status_in_merge_request.rb +++ b/db/migrate/20130220125544_convert_merge_status_in_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ConvertMergeStatusInMergeRequest < ActiveRecord::Migration +class ConvertMergeStatusInMergeRequest < ActiveRecord::Migration[4.2] def up execute "UPDATE #{table_name} SET new_merge_status = 'unchecked' WHERE merge_status = 1" execute "UPDATE #{table_name} SET new_merge_status = 'can_be_merged' WHERE merge_status = 2" diff --git a/db/migrate/20130220125545_remove_merge_status_from_merge_request.rb b/db/migrate/20130220125545_remove_merge_status_from_merge_request.rb index bd25ffbfc99..02a9db29b6e 100644 --- a/db/migrate/20130220125545_remove_merge_status_from_merge_request.rb +++ b/db/migrate/20130220125545_remove_merge_status_from_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveMergeStatusFromMergeRequest < ActiveRecord::Migration +class RemoveMergeStatusFromMergeRequest < ActiveRecord::Migration[4.2] def up remove_column :merge_requests, :merge_status end diff --git a/db/migrate/20130220133245_rename_new_merge_status_to_merge_status_in_milestone.rb b/db/migrate/20130220133245_rename_new_merge_status_to_merge_status_in_milestone.rb index f0595720a39..70352c09af2 100644 --- a/db/migrate/20130220133245_rename_new_merge_status_to_merge_status_in_milestone.rb +++ b/db/migrate/20130220133245_rename_new_merge_status_to_merge_status_in_milestone.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RenameNewMergeStatusToMergeStatusInMilestone < ActiveRecord::Migration +class RenameNewMergeStatusToMergeStatusInMilestone < ActiveRecord::Migration[4.2] def change rename_column :merge_requests, :new_merge_status, :merge_status end diff --git a/db/migrate/20130304104623_add_state_to_user.rb b/db/migrate/20130304104623_add_state_to_user.rb index 4456d022e3f..4602427e8ae 100644 --- a/db/migrate/20130304104623_add_state_to_user.rb +++ b/db/migrate/20130304104623_add_state_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddStateToUser < ActiveRecord::Migration +class AddStateToUser < ActiveRecord::Migration[4.2] def change add_column :users, :state, :string end diff --git a/db/migrate/20130304104740_convert_blocked_to_state.rb b/db/migrate/20130304104740_convert_blocked_to_state.rb index 9afd1093645..69b3aa731c9 100644 --- a/db/migrate/20130304104740_convert_blocked_to_state.rb +++ b/db/migrate/20130304104740_convert_blocked_to_state.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ConvertBlockedToState < ActiveRecord::Migration +class ConvertBlockedToState < ActiveRecord::Migration[4.2] def up User.transaction do User.where(blocked: true).update_all(state: :blocked) diff --git a/db/migrate/20130304105317_remove_blocked_from_user.rb b/db/migrate/20130304105317_remove_blocked_from_user.rb index 8f5b2c59b43..c29845d3388 100644 --- a/db/migrate/20130304105317_remove_blocked_from_user.rb +++ b/db/migrate/20130304105317_remove_blocked_from_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveBlockedFromUser < ActiveRecord::Migration +class RemoveBlockedFromUser < ActiveRecord::Migration[4.2] def up remove_column :users, :blocked end diff --git a/db/migrate/20130315124931_user_color_scheme.rb b/db/migrate/20130315124931_user_color_scheme.rb index 09af928fde7..1da488a4c52 100644 --- a/db/migrate/20130315124931_user_color_scheme.rb +++ b/db/migrate/20130315124931_user_color_scheme.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class UserColorScheme < ActiveRecord::Migration +class UserColorScheme < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20130318212250_add_snippets_to_features.rb b/db/migrate/20130318212250_add_snippets_to_features.rb index 9860b85f504..8c0d898570a 100644 --- a/db/migrate/20130318212250_add_snippets_to_features.rb +++ b/db/migrate/20130318212250_add_snippets_to_features.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddSnippetsToFeatures < ActiveRecord::Migration +class AddSnippetsToFeatures < ActiveRecord::Migration[4.2] def change add_column :projects, :snippets_enabled, :boolean, null: false, default: true end diff --git a/db/migrate/20130319214458_create_forked_project_links.rb b/db/migrate/20130319214458_create_forked_project_links.rb index 065a5e08243..27817d8476e 100644 --- a/db/migrate/20130319214458_create_forked_project_links.rb +++ b/db/migrate/20130319214458_create_forked_project_links.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateForkedProjectLinks < ActiveRecord::Migration +class CreateForkedProjectLinks < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20130323174317_add_private_to_snippets.rb b/db/migrate/20130323174317_add_private_to_snippets.rb index 376f4618d41..8b5838a71c7 100644 --- a/db/migrate/20130323174317_add_private_to_snippets.rb +++ b/db/migrate/20130323174317_add_private_to_snippets.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPrivateToSnippets < ActiveRecord::Migration +class AddPrivateToSnippets < ActiveRecord::Migration[4.2] def change add_column :snippets, :private, :boolean, null: false, default: true end diff --git a/db/migrate/20130324151736_add_type_to_snippets.rb b/db/migrate/20130324151736_add_type_to_snippets.rb index 097cb9bc7cb..ca4d4aa36bd 100644 --- a/db/migrate/20130324151736_add_type_to_snippets.rb +++ b/db/migrate/20130324151736_add_type_to_snippets.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTypeToSnippets < ActiveRecord::Migration +class AddTypeToSnippets < ActiveRecord::Migration[4.2] def change add_column :snippets, :type, :string end diff --git a/db/migrate/20130324172327_change_project_id_to_null_in_snipepts.rb b/db/migrate/20130324172327_change_project_id_to_null_in_snipepts.rb index 9256e62086e..30f64cd2626 100644 --- a/db/migrate/20130324172327_change_project_id_to_null_in_snipepts.rb +++ b/db/migrate/20130324172327_change_project_id_to_null_in_snipepts.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ChangeProjectIdToNullInSnipepts < ActiveRecord::Migration +class ChangeProjectIdToNullInSnipepts < ActiveRecord::Migration[4.2] def up change_column :snippets, :project_id, :integer, :null => true end diff --git a/db/migrate/20130324203535_add_type_value_for_snippets.rb b/db/migrate/20130324203535_add_type_value_for_snippets.rb index 6e910fd74c7..b3ada36e103 100644 --- a/db/migrate/20130324203535_add_type_value_for_snippets.rb +++ b/db/migrate/20130324203535_add_type_value_for_snippets.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTypeValueForSnippets < ActiveRecord::Migration +class AddTypeValueForSnippets < ActiveRecord::Migration[4.2] def up Snippet.where("project_id IS NOT NULL").update_all(type: 'ProjectSnippet') end diff --git a/db/migrate/20130325173941_add_notification_level_to_user.rb b/db/migrate/20130325173941_add_notification_level_to_user.rb index 1dc58d4bcc8..e6d97b166dc 100644 --- a/db/migrate/20130325173941_add_notification_level_to_user.rb +++ b/db/migrate/20130325173941_add_notification_level_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNotificationLevelToUser < ActiveRecord::Migration +class AddNotificationLevelToUser < ActiveRecord::Migration[4.2] def change add_column :users, :notification_level, :integer, null: false, default: 1 end diff --git a/db/migrate/20130326142630_add_index_to_users_authentication_token.rb b/db/migrate/20130326142630_add_index_to_users_authentication_token.rb index 0592181927e..75d2c3e155f 100644 --- a/db/migrate/20130326142630_add_index_to_users_authentication_token.rb +++ b/db/migrate/20130326142630_add_index_to_users_authentication_token.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexToUsersAuthenticationToken < ActiveRecord::Migration +class AddIndexToUsersAuthenticationToken < ActiveRecord::Migration[4.2] def change add_index :users, :authentication_token, unique: true end diff --git a/db/migrate/20130403003950_add_last_activity_column_into_project.rb b/db/migrate/20130403003950_add_last_activity_column_into_project.rb index 04a01612c6f..a90199e160d 100644 --- a/db/migrate/20130403003950_add_last_activity_column_into_project.rb +++ b/db/migrate/20130403003950_add_last_activity_column_into_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddLastActivityColumnIntoProject < ActiveRecord::Migration +class AddLastActivityColumnIntoProject < ActiveRecord::Migration[4.2] def up add_column :projects, :last_activity_at, :datetime add_index :projects, :last_activity_at diff --git a/db/migrate/20130404164628_add_notification_level_to_user_project.rb b/db/migrate/20130404164628_add_notification_level_to_user_project.rb index 1e072d9c6e1..01c098d068d 100644 --- a/db/migrate/20130404164628_add_notification_level_to_user_project.rb +++ b/db/migrate/20130404164628_add_notification_level_to_user_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNotificationLevelToUserProject < ActiveRecord::Migration +class AddNotificationLevelToUserProject < ActiveRecord::Migration[4.2] def change add_column :users_projects, :notification_level, :integer, null: false, default: 3 end diff --git a/db/migrate/20130410175022_remove_wiki_table.rb b/db/migrate/20130410175022_remove_wiki_table.rb index 5885b1cc375..5fb4ab506ef 100644 --- a/db/migrate/20130410175022_remove_wiki_table.rb +++ b/db/migrate/20130410175022_remove_wiki_table.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveWikiTable < ActiveRecord::Migration +class RemoveWikiTable < ActiveRecord::Migration[4.2] def up drop_table :wikis end diff --git a/db/migrate/20130419190306_allow_merges_for_forks.rb b/db/migrate/20130419190306_allow_merges_for_forks.rb index ec953986c6a..f83ba2334c8 100644 --- a/db/migrate/20130419190306_allow_merges_for_forks.rb +++ b/db/migrate/20130419190306_allow_merges_for_forks.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AllowMergesForForks < ActiveRecord::Migration +class AllowMergesForForks < ActiveRecord::Migration[4.2] def self.up add_column :merge_requests, :target_project_id, :integer, :null => true execute "UPDATE #{table_name} SET target_project_id = project_id" diff --git a/db/migrate/20130506085413_add_type_to_key.rb b/db/migrate/20130506085413_add_type_to_key.rb index c9f1ee4e389..1b81a29d65b 100644 --- a/db/migrate/20130506085413_add_type_to_key.rb +++ b/db/migrate/20130506085413_add_type_to_key.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTypeToKey < ActiveRecord::Migration +class AddTypeToKey < ActiveRecord::Migration[4.2] def change add_column :keys, :type, :string end diff --git a/db/migrate/20130506090604_create_deploy_keys_projects.rb b/db/migrate/20130506090604_create_deploy_keys_projects.rb index 8b9662a27c3..e1ab6016ffc 100644 --- a/db/migrate/20130506090604_create_deploy_keys_projects.rb +++ b/db/migrate/20130506090604_create_deploy_keys_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateDeployKeysProjects < ActiveRecord::Migration +class CreateDeployKeysProjects < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20130506095501_remove_project_id_from_key.rb b/db/migrate/20130506095501_remove_project_id_from_key.rb index 53abc4e7b52..cbea7ed860c 100644 --- a/db/migrate/20130506095501_remove_project_id_from_key.rb +++ b/db/migrate/20130506095501_remove_project_id_from_key.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveProjectIdFromKey < ActiveRecord::Migration +class RemoveProjectIdFromKey < ActiveRecord::Migration[4.2] def up puts 'Migrate deploy keys: ' Key.where('project_id IS NOT NULL').update_all(type: 'DeployKey') diff --git a/db/migrate/20130522141856_add_more_fields_to_service.rb b/db/migrate/20130522141856_add_more_fields_to_service.rb index 9f764a1d050..b90923ebb57 100644 --- a/db/migrate/20130522141856_add_more_fields_to_service.rb +++ b/db/migrate/20130522141856_add_more_fields_to_service.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMoreFieldsToService < ActiveRecord::Migration +class AddMoreFieldsToService < ActiveRecord::Migration[4.2] def change add_column :services, :subdomain, :string add_column :services, :room, :string diff --git a/db/migrate/20130528184641_add_system_to_notes.rb b/db/migrate/20130528184641_add_system_to_notes.rb index 27fbf8983ac..64825bb316e 100644 --- a/db/migrate/20130528184641_add_system_to_notes.rb +++ b/db/migrate/20130528184641_add_system_to_notes.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddSystemToNotes < ActiveRecord::Migration +class AddSystemToNotes < ActiveRecord::Migration[4.2] class Note < ActiveRecord::Base end diff --git a/db/migrate/20130611210815_increase_snippet_text_column_size.rb b/db/migrate/20130611210815_increase_snippet_text_column_size.rb index f710c79a9a5..4ee3c6d2ad3 100644 --- a/db/migrate/20130611210815_increase_snippet_text_column_size.rb +++ b/db/migrate/20130611210815_increase_snippet_text_column_size.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class IncreaseSnippetTextColumnSize < ActiveRecord::Migration +class IncreaseSnippetTextColumnSize < ActiveRecord::Migration[4.2] def up # MYSQL LARGETEXT for snippet change_column :snippets, :content, :text, :limit => 4294967295 diff --git a/db/migrate/20130613165816_add_password_expires_at_to_users.rb b/db/migrate/20130613165816_add_password_expires_at_to_users.rb index 47306a370a8..61c301e38ad 100644 --- a/db/migrate/20130613165816_add_password_expires_at_to_users.rb +++ b/db/migrate/20130613165816_add_password_expires_at_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPasswordExpiresAtToUsers < ActiveRecord::Migration +class AddPasswordExpiresAtToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :password_expires_at, :datetime end diff --git a/db/migrate/20130613173246_add_created_by_id_to_user.rb b/db/migrate/20130613173246_add_created_by_id_to_user.rb index 3138c0f40a7..daea9045295 100644 --- a/db/migrate/20130613173246_add_created_by_id_to_user.rb +++ b/db/migrate/20130613173246_add_created_by_id_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCreatedByIdToUser < ActiveRecord::Migration +class AddCreatedByIdToUser < ActiveRecord::Migration[4.2] def change add_column :users, :created_by_id, :integer end diff --git a/db/migrate/20130614132337_add_improted_to_project.rb b/db/migrate/20130614132337_add_improted_to_project.rb index 26dc16e3b43..b72e82d871c 100644 --- a/db/migrate/20130614132337_add_improted_to_project.rb +++ b/db/migrate/20130614132337_add_improted_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddImprotedToProject < ActiveRecord::Migration +class AddImprotedToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :imported, :boolean, default: false, null: false end diff --git a/db/migrate/20130617095603_create_users_groups.rb b/db/migrate/20130617095603_create_users_groups.rb index 4ba7d0c9461..32a70a0d6bb 100644 --- a/db/migrate/20130617095603_create_users_groups.rb +++ b/db/migrate/20130617095603_create_users_groups.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateUsersGroups < ActiveRecord::Migration +class CreateUsersGroups < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20130621195223_add_notification_level_to_user_group.rb b/db/migrate/20130621195223_add_notification_level_to_user_group.rb index 6fd4941f615..b2b95b8d8e8 100644 --- a/db/migrate/20130621195223_add_notification_level_to_user_group.rb +++ b/db/migrate/20130621195223_add_notification_level_to_user_group.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNotificationLevelToUserGroup < ActiveRecord::Migration +class AddNotificationLevelToUserGroup < ActiveRecord::Migration[4.2] def change add_column :users_groups, :notification_level, :integer, null: false, default: 3 end diff --git a/db/migrate/20130622115340_add_more_db_index.rb b/db/migrate/20130622115340_add_more_db_index.rb index 4113217de59..b84f05eefef 100644 --- a/db/migrate/20130622115340_add_more_db_index.rb +++ b/db/migrate/20130622115340_add_more_db_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMoreDbIndex < ActiveRecord::Migration +class AddMoreDbIndex < ActiveRecord::Migration[4.2] def change add_index :deploy_keys_projects, :project_id add_index :web_hooks, :project_id diff --git a/db/migrate/20130624162710_add_fingerprint_to_key.rb b/db/migrate/20130624162710_add_fingerprint_to_key.rb index 3e574ea81b9..55ed2877e32 100644 --- a/db/migrate/20130624162710_add_fingerprint_to_key.rb +++ b/db/migrate/20130624162710_add_fingerprint_to_key.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddFingerprintToKey < ActiveRecord::Migration +class AddFingerprintToKey < ActiveRecord::Migration[4.2] def change add_column :keys, :fingerprint, :string remove_column :keys, :identifier diff --git a/db/migrate/20130711063759_create_project_group_links.rb b/db/migrate/20130711063759_create_project_group_links.rb index efccb2aa938..80537c614b9 100644 --- a/db/migrate/20130711063759_create_project_group_links.rb +++ b/db/migrate/20130711063759_create_project_group_links.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateProjectGroupLinks < ActiveRecord::Migration +class CreateProjectGroupLinks < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20130804151314_add_st_diff_to_note.rb b/db/migrate/20130804151314_add_st_diff_to_note.rb index 9e2da73b695..b8836a00947 100644 --- a/db/migrate/20130804151314_add_st_diff_to_note.rb +++ b/db/migrate/20130804151314_add_st_diff_to_note.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddStDiffToNote < ActiveRecord::Migration +class AddStDiffToNote < ActiveRecord::Migration[4.2] def change add_column :notes, :st_diff, :text, :null => true end diff --git a/db/migrate/20130809124851_add_permission_check_to_user.rb b/db/migrate/20130809124851_add_permission_check_to_user.rb index 9f9dea36101..9cc71491446 100644 --- a/db/migrate/20130809124851_add_permission_check_to_user.rb +++ b/db/migrate/20130809124851_add_permission_check_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPermissionCheckToUser < ActiveRecord::Migration +class AddPermissionCheckToUser < ActiveRecord::Migration[4.2] def change add_column :users, :last_credential_check_at, :datetime end diff --git a/db/migrate/20130812143708_add_import_url_to_project.rb b/db/migrate/20130812143708_add_import_url_to_project.rb index d2bdfe1894e..3e6ecce5b43 100644 --- a/db/migrate/20130812143708_add_import_url_to_project.rb +++ b/db/migrate/20130812143708_add_import_url_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddImportUrlToProject < ActiveRecord::Migration +class AddImportUrlToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :import_url, :string end diff --git a/db/migrate/20130819182730_add_internal_ids_to_issues_and_mr.rb b/db/migrate/20130819182730_add_internal_ids_to_issues_and_mr.rb index 0e0e78b0f0d..194259c7eb9 100644 --- a/db/migrate/20130819182730_add_internal_ids_to_issues_and_mr.rb +++ b/db/migrate/20130819182730_add_internal_ids_to_issues_and_mr.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddInternalIdsToIssuesAndMr < ActiveRecord::Migration +class AddInternalIdsToIssuesAndMr < ActiveRecord::Migration[4.2] def change add_column :issues, :iid, :integer add_column :merge_requests, :iid, :integer diff --git a/db/migrate/20130820102832_add_access_to_project_group_link.rb b/db/migrate/20130820102832_add_access_to_project_group_link.rb index 98f3fa87523..0ab21b85706 100644 --- a/db/migrate/20130820102832_add_access_to_project_group_link.rb +++ b/db/migrate/20130820102832_add_access_to_project_group_link.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddAccessToProjectGroupLink < ActiveRecord::Migration +class AddAccessToProjectGroupLink < ActiveRecord::Migration[4.2] def change add_column :project_group_links, :group_access, :integer, null: false, default: ProjectGroupLink.default_access end diff --git a/db/migrate/20130821090530_remove_deprecated_tables.rb b/db/migrate/20130821090530_remove_deprecated_tables.rb index d22e713a7a1..d6e741a2376 100644 --- a/db/migrate/20130821090530_remove_deprecated_tables.rb +++ b/db/migrate/20130821090530_remove_deprecated_tables.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveDeprecatedTables < ActiveRecord::Migration +class RemoveDeprecatedTables < ActiveRecord::Migration[4.2] def up drop_table :user_teams drop_table :user_team_project_relationships diff --git a/db/migrate/20130821090531_add_internal_ids_to_milestones.rb b/db/migrate/20130821090531_add_internal_ids_to_milestones.rb index e25b8f91662..c6015a512a7 100644 --- a/db/migrate/20130821090531_add_internal_ids_to_milestones.rb +++ b/db/migrate/20130821090531_add_internal_ids_to_milestones.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddInternalIdsToMilestones < ActiveRecord::Migration +class AddInternalIdsToMilestones < ActiveRecord::Migration[4.2] def change add_column :milestones, :iid, :integer end diff --git a/db/migrate/20130909132950_add_description_to_merge_request.rb b/db/migrate/20130909132950_add_description_to_merge_request.rb index fbac50c8216..59f5cb1b7fa 100644 --- a/db/migrate/20130909132950_add_description_to_merge_request.rb +++ b/db/migrate/20130909132950_add_description_to_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDescriptionToMergeRequest < ActiveRecord::Migration +class AddDescriptionToMergeRequest < ActiveRecord::Migration[4.2] def change add_column :merge_requests, :description, :text, null: true end diff --git a/db/migrate/20130926081215_change_owner_id_for_group.rb b/db/migrate/20130926081215_change_owner_id_for_group.rb index 2bdd22d5a04..a9b106db4db 100644 --- a/db/migrate/20130926081215_change_owner_id_for_group.rb +++ b/db/migrate/20130926081215_change_owner_id_for_group.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ChangeOwnerIdForGroup < ActiveRecord::Migration +class ChangeOwnerIdForGroup < ActiveRecord::Migration[4.2] def up change_column :namespaces, :owner_id, :integer, null: true end diff --git a/db/migrate/20131005191208_add_avatar_to_users.rb b/db/migrate/20131005191208_add_avatar_to_users.rb index df9057b81d6..026f42cd047 100644 --- a/db/migrate/20131005191208_add_avatar_to_users.rb +++ b/db/migrate/20131005191208_add_avatar_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddAvatarToUsers < ActiveRecord::Migration +class AddAvatarToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :avatar, :string end diff --git a/db/migrate/20131009115346_add_confirmable_to_users.rb b/db/migrate/20131009115346_add_confirmable_to_users.rb index d714dd98e85..1ffec52fc2b 100644 --- a/db/migrate/20131009115346_add_confirmable_to_users.rb +++ b/db/migrate/20131009115346_add_confirmable_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddConfirmableToUsers < ActiveRecord::Migration +class AddConfirmableToUsers < ActiveRecord::Migration[4.2] def self.up add_column :users, :confirmation_token, :string add_column :users, :confirmed_at, :datetime diff --git a/db/migrate/20131106151520_remove_default_branch.rb b/db/migrate/20131106151520_remove_default_branch.rb index fd3d1ed7ab3..94782d02f49 100644 --- a/db/migrate/20131106151520_remove_default_branch.rb +++ b/db/migrate/20131106151520_remove_default_branch.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveDefaultBranch < ActiveRecord::Migration +class RemoveDefaultBranch < ActiveRecord::Migration[4.2] def up remove_column :projects, :default_branch end diff --git a/db/migrate/20131112114325_create_broadcast_messages.rb b/db/migrate/20131112114325_create_broadcast_messages.rb index ad2549e53af..fcc3eab0dce 100644 --- a/db/migrate/20131112114325_create_broadcast_messages.rb +++ b/db/migrate/20131112114325_create_broadcast_messages.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateBroadcastMessages < ActiveRecord::Migration +class CreateBroadcastMessages < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20131112220935_add_visibility_level_to_projects.rb b/db/migrate/20131112220935_add_visibility_level_to_projects.rb index 86d73753adc..d09e9f757ed 100644 --- a/db/migrate/20131112220935_add_visibility_level_to_projects.rb +++ b/db/migrate/20131112220935_add_visibility_level_to_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddVisibilityLevelToProjects < ActiveRecord::Migration +class AddVisibilityLevelToProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def self.up diff --git a/db/migrate/20131129154016_add_archived_to_projects.rb b/db/migrate/20131129154016_add_archived_to_projects.rb index e8e6908d137..6253f81fdcb 100644 --- a/db/migrate/20131129154016_add_archived_to_projects.rb +++ b/db/migrate/20131129154016_add_archived_to_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddArchivedToProjects < ActiveRecord::Migration +class AddArchivedToProjects < ActiveRecord::Migration[4.2] def change add_column :projects, :archived, :boolean, default: false, null: false end diff --git a/db/migrate/20131130165425_add_color_and_font_to_broadcast_messages.rb b/db/migrate/20131130165425_add_color_and_font_to_broadcast_messages.rb index 348a284a53e..51c93408db5 100644 --- a/db/migrate/20131130165425_add_color_and_font_to_broadcast_messages.rb +++ b/db/migrate/20131130165425_add_color_and_font_to_broadcast_messages.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddColorAndFontToBroadcastMessages < ActiveRecord::Migration +class AddColorAndFontToBroadcastMessages < ActiveRecord::Migration[4.2] def change add_column :broadcast_messages, :color, :string add_column :broadcast_messages, :font, :string diff --git a/db/migrate/20131202192556_add_event_fields_for_web_hook.rb b/db/migrate/20131202192556_add_event_fields_for_web_hook.rb index 99d76611524..cce78846a7b 100644 --- a/db/migrate/20131202192556_add_event_fields_for_web_hook.rb +++ b/db/migrate/20131202192556_add_event_fields_for_web_hook.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddEventFieldsForWebHook < ActiveRecord::Migration +class AddEventFieldsForWebHook < ActiveRecord::Migration[4.2] def change add_column :web_hooks, :push_events, :boolean, default: true, null: false add_column :web_hooks, :issues_events, :boolean, default: false, null: false diff --git a/db/migrate/20131214224427_add_hide_no_ssh_key_to_users.rb b/db/migrate/20131214224427_add_hide_no_ssh_key_to_users.rb index 4333dc59323..04fc87c6d70 100644 --- a/db/migrate/20131214224427_add_hide_no_ssh_key_to_users.rb +++ b/db/migrate/20131214224427_add_hide_no_ssh_key_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddHideNoSshKeyToUsers < ActiveRecord::Migration +class AddHideNoSshKeyToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :hide_no_ssh_key, :boolean, :default => false end diff --git a/db/migrate/20131217102743_add_recipients_to_service.rb b/db/migrate/20131217102743_add_recipients_to_service.rb index 3c76be0f68d..ded656b5bb4 100644 --- a/db/migrate/20131217102743_add_recipients_to_service.rb +++ b/db/migrate/20131217102743_add_recipients_to_service.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddRecipientsToService < ActiveRecord::Migration +class AddRecipientsToService < ActiveRecord::Migration[4.2] def change add_column :services, :recipients, :text end diff --git a/db/migrate/20140116231608_add_website_url_to_users.rb b/db/migrate/20140116231608_add_website_url_to_users.rb index 1c39423562e..b6ec29ae67f 100644 --- a/db/migrate/20140116231608_add_website_url_to_users.rb +++ b/db/migrate/20140116231608_add_website_url_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddWebsiteUrlToUsers < ActiveRecord::Migration +class AddWebsiteUrlToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :website_url, :string, {:null => false, :default => ''} end diff --git a/db/migrate/20140122112253_create_merge_request_diffs.rb b/db/migrate/20140122112253_create_merge_request_diffs.rb index 6c7a92b6950..04f6d7f3fb9 100644 --- a/db/migrate/20140122112253_create_merge_request_diffs.rb +++ b/db/migrate/20140122112253_create_merge_request_diffs.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateMergeRequestDiffs < ActiveRecord::Migration +class CreateMergeRequestDiffs < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20140122114406_migrate_mr_diffs.rb b/db/migrate/20140122114406_migrate_mr_diffs.rb index 429aeb2293f..20d28a89f29 100644 --- a/db/migrate/20140122114406_migrate_mr_diffs.rb +++ b/db/migrate/20140122114406_migrate_mr_diffs.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateMrDiffs < ActiveRecord::Migration +class MigrateMrDiffs < ActiveRecord::Migration[4.2] def self.up execute "INSERT INTO merge_request_diffs ( merge_request_id, st_commits, st_diffs ) SELECT id, st_commits, st_diffs FROM merge_requests" end diff --git a/db/migrate/20140122122549_remove_m_rdiff_fields.rb b/db/migrate/20140122122549_remove_m_rdiff_fields.rb index bbf35811b61..36af8e621be 100644 --- a/db/migrate/20140122122549_remove_m_rdiff_fields.rb +++ b/db/migrate/20140122122549_remove_m_rdiff_fields.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveMRdiffFields < ActiveRecord::Migration +class RemoveMRdiffFields < ActiveRecord::Migration[4.2] def up remove_column :merge_requests, :st_commits remove_column :merge_requests, :st_diffs diff --git a/db/migrate/20140125162722_add_avatar_to_projects.rb b/db/migrate/20140125162722_add_avatar_to_projects.rb index 888341b7535..7fb3b75661a 100644 --- a/db/migrate/20140125162722_add_avatar_to_projects.rb +++ b/db/migrate/20140125162722_add_avatar_to_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddAvatarToProjects < ActiveRecord::Migration +class AddAvatarToProjects < ActiveRecord::Migration[4.2] def change add_column :projects, :avatar, :string end diff --git a/db/migrate/20140127170938_add_group_avatars.rb b/db/migrate/20140127170938_add_group_avatars.rb index 95d1c1c6b27..713e168ef8d 100644 --- a/db/migrate/20140127170938_add_group_avatars.rb +++ b/db/migrate/20140127170938_add_group_avatars.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddGroupAvatars < ActiveRecord::Migration +class AddGroupAvatars < ActiveRecord::Migration[4.2] def change add_column :namespaces, :avatar, :string end diff --git a/db/migrate/20140209025651_create_emails.rb b/db/migrate/20140209025651_create_emails.rb index 51886f8fc89..eefa1339380 100644 --- a/db/migrate/20140209025651_create_emails.rb +++ b/db/migrate/20140209025651_create_emails.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateEmails < ActiveRecord::Migration +class CreateEmails < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20140214102325_add_api_key_to_services.rb b/db/migrate/20140214102325_add_api_key_to_services.rb index b58c36c0a30..722edfc1227 100644 --- a/db/migrate/20140214102325_add_api_key_to_services.rb +++ b/db/migrate/20140214102325_add_api_key_to_services.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddApiKeyToServices < ActiveRecord::Migration +class AddApiKeyToServices < ActiveRecord::Migration[4.2] def change add_column :services, :api_key, :string end diff --git a/db/migrate/20140304005354_add_index_merge_request_diffs_on_merge_request_id.rb b/db/migrate/20140304005354_add_index_merge_request_diffs_on_merge_request_id.rb index aab8a41c2c3..c9ec450bd0f 100644 --- a/db/migrate/20140304005354_add_index_merge_request_diffs_on_merge_request_id.rb +++ b/db/migrate/20140304005354_add_index_merge_request_diffs_on_merge_request_id.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexMergeRequestDiffsOnMergeRequestId < ActiveRecord::Migration +class AddIndexMergeRequestDiffsOnMergeRequestId < ActiveRecord::Migration[4.2] def change add_index :merge_request_diffs, :merge_request_id, unique: true end diff --git a/db/migrate/20140305193308_add_tag_push_hooks_to_project_hook.rb b/db/migrate/20140305193308_add_tag_push_hooks_to_project_hook.rb index ec163bb843c..55c0fa56418 100644 --- a/db/migrate/20140305193308_add_tag_push_hooks_to_project_hook.rb +++ b/db/migrate/20140305193308_add_tag_push_hooks_to_project_hook.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTagPushHooksToProjectHook < ActiveRecord::Migration +class AddTagPushHooksToProjectHook < ActiveRecord::Migration[4.2] def change add_column :web_hooks, :tag_push_events, :boolean, default: false end diff --git a/db/migrate/20140312145357_add_import_status_to_project.rb b/db/migrate/20140312145357_add_import_status_to_project.rb index 9947cd8c6f9..37e8f375b30 100644 --- a/db/migrate/20140312145357_add_import_status_to_project.rb +++ b/db/migrate/20140312145357_add_import_status_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddImportStatusToProject < ActiveRecord::Migration +class AddImportStatusToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :import_status, :string end diff --git a/db/migrate/20140313092127_migrate_already_imported_projects.rb b/db/migrate/20140313092127_migrate_already_imported_projects.rb index 0afc26b8764..2465e508c9f 100644 --- a/db/migrate/20140313092127_migrate_already_imported_projects.rb +++ b/db/migrate/20140313092127_migrate_already_imported_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateAlreadyImportedProjects < ActiveRecord::Migration +class MigrateAlreadyImportedProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20140407135544_fix_namespaces.rb b/db/migrate/20140407135544_fix_namespaces.rb index 0026ce645a6..39abd7cd113 100644 --- a/db/migrate/20140407135544_fix_namespaces.rb +++ b/db/migrate/20140407135544_fix_namespaces.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class FixNamespaces < ActiveRecord::Migration +class FixNamespaces < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb b/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb index fb9c7a6636e..148b46f8830 100644 --- a/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb +++ b/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ChangeStateToAllowEmptyMergeRequestDiffs < ActiveRecord::Migration +class ChangeStateToAllowEmptyMergeRequestDiffs < ActiveRecord::Migration[4.2] def up change_column :merge_request_diffs, :state, :string, null: true, default: nil diff --git a/db/migrate/20140416074002_add_index_on_iid.rb b/db/migrate/20140416074002_add_index_on_iid.rb index 6cdaa5a3c08..c7f707ca123 100644 --- a/db/migrate/20140416074002_add_index_on_iid.rb +++ b/db/migrate/20140416074002_add_index_on_iid.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexOnIid < ActiveRecord::Migration +class AddIndexOnIid < ActiveRecord::Migration[4.2] def change RemoveDuplicateIid.clean(Issue) RemoveDuplicateIid.clean(MergeRequest, 'target_project_id') diff --git a/db/migrate/20140416185734_index_on_current_sign_in_at.rb b/db/migrate/20140416185734_index_on_current_sign_in_at.rb index 8c620b545bd..7dabcb937b3 100644 --- a/db/migrate/20140416185734_index_on_current_sign_in_at.rb +++ b/db/migrate/20140416185734_index_on_current_sign_in_at.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class IndexOnCurrentSignInAt < ActiveRecord::Migration +class IndexOnCurrentSignInAt < ActiveRecord::Migration[4.2] def change add_index :users, :current_sign_in_at end diff --git a/db/migrate/20140428105831_add_notes_index_updated_at.rb b/db/migrate/20140428105831_add_notes_index_updated_at.rb index 0589101af93..25bdf477e24 100644 --- a/db/migrate/20140428105831_add_notes_index_updated_at.rb +++ b/db/migrate/20140428105831_add_notes_index_updated_at.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNotesIndexUpdatedAt < ActiveRecord::Migration +class AddNotesIndexUpdatedAt < ActiveRecord::Migration[4.2] def change add_index :notes, :updated_at end diff --git a/db/migrate/20140502115131_add_repo_size_to_db.rb b/db/migrate/20140502115131_add_repo_size_to_db.rb index 090b30a4f26..4cb7a01bbf2 100644 --- a/db/migrate/20140502115131_add_repo_size_to_db.rb +++ b/db/migrate/20140502115131_add_repo_size_to_db.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddRepoSizeToDb < ActiveRecord::Migration +class AddRepoSizeToDb < ActiveRecord::Migration[4.2] def change add_column :projects, :repository_size, :float, default: 0 end diff --git a/db/migrate/20140502125220_migrate_repo_size.rb b/db/migrate/20140502125220_migrate_repo_size.rb index ca1b054600c..a69b02cddc4 100644 --- a/db/migrate/20140502125220_migrate_repo_size.rb +++ b/db/migrate/20140502125220_migrate_repo_size.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateRepoSize < ActiveRecord::Migration +class MigrateRepoSize < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20140611135229_add_position_to_merge_request.rb b/db/migrate/20140611135229_add_position_to_merge_request.rb index 3a7d2f7c359..6ec644eecce 100644 --- a/db/migrate/20140611135229_add_position_to_merge_request.rb +++ b/db/migrate/20140611135229_add_position_to_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPositionToMergeRequest < ActiveRecord::Migration +class AddPositionToMergeRequest < ActiveRecord::Migration[4.2] def change add_column :merge_requests, :position, :integer, default: 0 end diff --git a/db/migrate/20140625115202_create_users_star_projects.rb b/db/migrate/20140625115202_create_users_star_projects.rb index d4f3fe5ac62..2237927fc78 100644 --- a/db/migrate/20140625115202_create_users_star_projects.rb +++ b/db/migrate/20140625115202_create_users_star_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateUsersStarProjects < ActiveRecord::Migration +class CreateUsersStarProjects < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20140729134820_create_labels.rb b/db/migrate/20140729134820_create_labels.rb index 66d20e741a6..1060610b660 100644 --- a/db/migrate/20140729134820_create_labels.rb +++ b/db/migrate/20140729134820_create_labels.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateLabels < ActiveRecord::Migration +class CreateLabels < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20140729140420_create_label_links.rb b/db/migrate/20140729140420_create_label_links.rb index dacd9f2e4b6..b8596a44a21 100644 --- a/db/migrate/20140729140420_create_label_links.rb +++ b/db/migrate/20140729140420_create_label_links.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateLabelLinks < ActiveRecord::Migration +class CreateLabelLinks < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20140729145339_migrate_project_tags.rb b/db/migrate/20140729145339_migrate_project_tags.rb index ac46847f3e6..4cd2e456727 100644 --- a/db/migrate/20140729145339_migrate_project_tags.rb +++ b/db/migrate/20140729145339_migrate_project_tags.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateProjectTags < ActiveRecord::Migration +class MigrateProjectTags < ActiveRecord::Migration[4.2] def up ActsAsTaggableOn::Tagging.where(taggable_type: 'Project', context: 'labels').update_all(context: 'tags') end diff --git a/db/migrate/20140729152420_migrate_taggable_labels.rb b/db/migrate/20140729152420_migrate_taggable_labels.rb index 04cdc6beadd..a8bf8022dfc 100644 --- a/db/migrate/20140729152420_migrate_taggable_labels.rb +++ b/db/migrate/20140729152420_migrate_taggable_labels.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateTaggableLabels < ActiveRecord::Migration +class MigrateTaggableLabels < ActiveRecord::Migration[4.2] def up taggings = ActsAsTaggableOn::Tagging.where(taggable_type: ['Issue', 'MergeRequest'], context: 'labels') taggings.find_each(batch_size: 500) do |tagging| diff --git a/db/migrate/20140730111702_add_index_to_labels.rb b/db/migrate/20140730111702_add_index_to_labels.rb index cc7ac1fc449..21f9dfd5d47 100644 --- a/db/migrate/20140730111702_add_index_to_labels.rb +++ b/db/migrate/20140730111702_add_index_to_labels.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexToLabels < ActiveRecord::Migration +class AddIndexToLabels < ActiveRecord::Migration[4.2] def change add_index "labels", :project_id add_index "label_links", :label_id diff --git a/db/migrate/20140903115954_migrate_to_new_shell.rb b/db/migrate/20140903115954_migrate_to_new_shell.rb index 04acf24284b..cc0cce483b1 100644 --- a/db/migrate/20140903115954_migrate_to_new_shell.rb +++ b/db/migrate/20140903115954_migrate_to_new_shell.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateToNewShell < ActiveRecord::Migration +class MigrateToNewShell < ActiveRecord::Migration[4.2] def change return if Rails.env.test? diff --git a/db/migrate/20140907220153_serialize_service_properties.rb b/db/migrate/20140907220153_serialize_service_properties.rb index c2d67fad0ab..bf94c64654b 100644 --- a/db/migrate/20140907220153_serialize_service_properties.rb +++ b/db/migrate/20140907220153_serialize_service_properties.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class SerializeServiceProperties < ActiveRecord::Migration +class SerializeServiceProperties < ActiveRecord::Migration[4.2] def change unless column_exists?(:services, :properties) add_column :services, :properties, :text diff --git a/db/migrate/20140914113604_add_members_table.rb b/db/migrate/20140914113604_add_members_table.rb index 0f76bb0ef79..312ea1b94df 100644 --- a/db/migrate/20140914113604_add_members_table.rb +++ b/db/migrate/20140914113604_add_members_table.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMembersTable < ActiveRecord::Migration +class AddMembersTable < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20140914145549_migrate_to_new_members_model.rb b/db/migrate/20140914145549_migrate_to_new_members_model.rb index b4c98f016d0..22d8b3d651b 100644 --- a/db/migrate/20140914145549_migrate_to_new_members_model.rb +++ b/db/migrate/20140914145549_migrate_to_new_members_model.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateToNewMembersModel < ActiveRecord::Migration +class MigrateToNewMembersModel < ActiveRecord::Migration[4.2] def up execute "INSERT INTO members ( user_id, source_id, source_type, access_level, notification_level, type ) SELECT user_id, group_id, 'Namespace', group_access, notification_level, 'GroupMember' FROM users_groups" execute "INSERT INTO members ( user_id, source_id, source_type, access_level, notification_level, type ) SELECT user_id, project_id, 'Project', project_access, notification_level, 'ProjectMember' FROM users_projects" diff --git a/db/migrate/20140914173417_remove_old_member_tables.rb b/db/migrate/20140914173417_remove_old_member_tables.rb index d2ab326ef1f..edd69caa470 100644 --- a/db/migrate/20140914173417_remove_old_member_tables.rb +++ b/db/migrate/20140914173417_remove_old_member_tables.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveOldMemberTables < ActiveRecord::Migration +class RemoveOldMemberTables < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20141006143943_move_slack_service_to_webhook.rb b/db/migrate/20141006143943_move_slack_service_to_webhook.rb index 561184615cc..1c9a1a74a4e 100644 --- a/db/migrate/20141006143943_move_slack_service_to_webhook.rb +++ b/db/migrate/20141006143943_move_slack_service_to_webhook.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MoveSlackServiceToWebhook < ActiveRecord::Migration +class MoveSlackServiceToWebhook < ActiveRecord::Migration[4.2] DOWNTIME = true DOWNTIME_REASON = 'Move old fields "token" and "subdomain" to one single field "webhook"' diff --git a/db/migrate/20141007100818_add_visibility_level_to_snippet.rb b/db/migrate/20141007100818_add_visibility_level_to_snippet.rb index 0c14f75c154..9501aed8931 100644 --- a/db/migrate/20141007100818_add_visibility_level_to_snippet.rb +++ b/db/migrate/20141007100818_add_visibility_level_to_snippet.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddVisibilityLevelToSnippet < ActiveRecord::Migration +class AddVisibilityLevelToSnippet < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20141118150935_add_audit_event.rb b/db/migrate/20141118150935_add_audit_event.rb index 52d70b4a0ac..1e7dba568c9 100644 --- a/db/migrate/20141118150935_add_audit_event.rb +++ b/db/migrate/20141118150935_add_audit_event.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddAuditEvent < ActiveRecord::Migration +class AddAuditEvent < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20141121133009_add_timestamps_to_members.rb b/db/migrate/20141121133009_add_timestamps_to_members.rb index 68f164cd35d..8ae95a1029e 100644 --- a/db/migrate/20141121133009_add_timestamps_to_members.rb +++ b/db/migrate/20141121133009_add_timestamps_to_members.rb @@ -4,7 +4,7 @@ # became a problem after commit c8e78d972a5a628870eefca0f2ccea0199c55bda which # was added in GitLab 7.5. With this migration we ensure that all rows in # 'members' have at least some created_at and updated_at timestamp. -class AddTimestampsToMembers < ActiveRecord::Migration +class AddTimestampsToMembers < ActiveRecord::Migration[4.2] def up execute "UPDATE members SET created_at = NOW() WHERE created_at is NULL" execute "UPDATE members SET updated_at = NOW() WHERE updated_at is NULL" diff --git a/db/migrate/20141121161704_add_identity_table.rb b/db/migrate/20141121161704_add_identity_table.rb index 5a399f0d325..92f7a568077 100644 --- a/db/migrate/20141121161704_add_identity_table.rb +++ b/db/migrate/20141121161704_add_identity_table.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIdentityTable < ActiveRecord::Migration +class AddIdentityTable < ActiveRecord::Migration[4.2] def up create_table :identities do |t| t.string :extern_uid diff --git a/db/migrate/20141205134006_add_locked_at_to_merge_request.rb b/db/migrate/20141205134006_add_locked_at_to_merge_request.rb index 5aa91c7587a..6fdfb3eb974 100644 --- a/db/migrate/20141205134006_add_locked_at_to_merge_request.rb +++ b/db/migrate/20141205134006_add_locked_at_to_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddLockedAtToMergeRequest < ActiveRecord::Migration +class AddLockedAtToMergeRequest < ActiveRecord::Migration[4.2] def change add_column :merge_requests, :locked_at, :datetime end diff --git a/db/migrate/20141216155758_create_doorkeeper_tables.rb b/db/migrate/20141216155758_create_doorkeeper_tables.rb index 17e45a77291..7bd0a15e7f5 100644 --- a/db/migrate/20141216155758_create_doorkeeper_tables.rb +++ b/db/migrate/20141216155758_create_doorkeeper_tables.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateDoorkeeperTables < ActiveRecord::Migration +class CreateDoorkeeperTables < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20141217125223_add_owner_to_application.rb b/db/migrate/20141217125223_add_owner_to_application.rb index e5a669ab4d8..3e335b7b311 100644 --- a/db/migrate/20141217125223_add_owner_to_application.rb +++ b/db/migrate/20141217125223_add_owner_to_application.rb @@ -1,8 +1,8 @@ # rubocop:disable all -class AddOwnerToApplication < ActiveRecord::Migration +class AddOwnerToApplication < ActiveRecord::Migration[4.2] def change add_column :oauth_applications, :owner_id, :integer, null: true add_column :oauth_applications, :owner_type, :string, null: true add_index :oauth_applications, [:owner_id, :owner_type] end -end
\ No newline at end of file +end diff --git a/db/migrate/20141223135007_add_import_data_to_project_table.rb b/db/migrate/20141223135007_add_import_data_to_project_table.rb index 9c8a483e4d5..44b680e6b95 100644 --- a/db/migrate/20141223135007_add_import_data_to_project_table.rb +++ b/db/migrate/20141223135007_add_import_data_to_project_table.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddImportDataToProjectTable < ActiveRecord::Migration +class AddImportDataToProjectTable < ActiveRecord::Migration[4.2] def change add_column :projects, :import_type, :string add_column :projects, :import_source, :string diff --git a/db/migrate/20141226080412_add_developers_can_push_to_protected_branches.rb b/db/migrate/20141226080412_add_developers_can_push_to_protected_branches.rb index a18b2f4974d..43b7de85228 100644 --- a/db/migrate/20141226080412_add_developers_can_push_to_protected_branches.rb +++ b/db/migrate/20141226080412_add_developers_can_push_to_protected_branches.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDevelopersCanPushToProtectedBranches < ActiveRecord::Migration +class AddDevelopersCanPushToProtectedBranches < ActiveRecord::Migration[4.2] def change add_column :protected_branches, :developers_can_push, :boolean, default: false, null: false end diff --git a/db/migrate/20150108073740_create_application_settings.rb b/db/migrate/20150108073740_create_application_settings.rb index 0e4c66ca8c0..be139fee63a 100644 --- a/db/migrate/20150108073740_create_application_settings.rb +++ b/db/migrate/20150108073740_create_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateApplicationSettings < ActiveRecord::Migration +class CreateApplicationSettings < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20150116234544_add_home_page_url_for_application_settings.rb b/db/migrate/20150116234544_add_home_page_url_for_application_settings.rb index 10e6549c729..5ead9503ca0 100644 --- a/db/migrate/20150116234544_add_home_page_url_for_application_settings.rb +++ b/db/migrate/20150116234544_add_home_page_url_for_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddHomePageUrlForApplicationSettings < ActiveRecord::Migration +class AddHomePageUrlForApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :home_page_url, :string end diff --git a/db/migrate/20150116234545_add_gitlab_access_token_to_user.rb b/db/migrate/20150116234545_add_gitlab_access_token_to_user.rb index e083973615a..be584c2dde7 100644 --- a/db/migrate/20150116234545_add_gitlab_access_token_to_user.rb +++ b/db/migrate/20150116234545_add_gitlab_access_token_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddGitlabAccessTokenToUser < ActiveRecord::Migration +class AddGitlabAccessTokenToUser < ActiveRecord::Migration[4.2] def change add_column :users, :gitlab_access_token, :string end diff --git a/db/migrate/20150125163100_add_default_branch_protection_setting.rb b/db/migrate/20150125163100_add_default_branch_protection_setting.rb index 7ca3116d354..f6bfa422124 100644 --- a/db/migrate/20150125163100_add_default_branch_protection_setting.rb +++ b/db/migrate/20150125163100_add_default_branch_protection_setting.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDefaultBranchProtectionSetting < ActiveRecord::Migration +class AddDefaultBranchProtectionSetting < ActiveRecord::Migration[4.2] def change add_column :application_settings, :default_branch_protection, :integer, :default => 2 end diff --git a/db/migrate/20150205211843_add_timestamps_to_identities.rb b/db/migrate/20150205211843_add_timestamps_to_identities.rb index a78e28eb4eb..c535a7ec781 100644 --- a/db/migrate/20150205211843_add_timestamps_to_identities.rb +++ b/db/migrate/20150205211843_add_timestamps_to_identities.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTimestampsToIdentities < ActiveRecord::Migration +class AddTimestampsToIdentities < ActiveRecord::Migration[4.2] def change add_timestamps(:identities) end diff --git a/db/migrate/20150206181414_add_index_to_created_at.rb b/db/migrate/20150206181414_add_index_to_created_at.rb index a161fad79dc..501acd6a720 100644 --- a/db/migrate/20150206181414_add_index_to_created_at.rb +++ b/db/migrate/20150206181414_add_index_to_created_at.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexToCreatedAt < ActiveRecord::Migration +class AddIndexToCreatedAt < ActiveRecord::Migration[4.2] def change add_index "users", [:created_at, :id] add_index "members", [:created_at, :id] diff --git a/db/migrate/20150206222854_add_notification_email_to_user.rb b/db/migrate/20150206222854_add_notification_email_to_user.rb index ebae092cac8..bef4ebe1f7b 100644 --- a/db/migrate/20150206222854_add_notification_email_to_user.rb +++ b/db/migrate/20150206222854_add_notification_email_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNotificationEmailToUser < ActiveRecord::Migration +class AddNotificationEmailToUser < ActiveRecord::Migration[4.2] def up add_column :users, :notification_email, :string diff --git a/db/migrate/20150209222013_add_missing_index.rb b/db/migrate/20150209222013_add_missing_index.rb index 18e3ac2cbbb..99544ab3928 100644 --- a/db/migrate/20150209222013_add_missing_index.rb +++ b/db/migrate/20150209222013_add_missing_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMissingIndex < ActiveRecord::Migration +class AddMissingIndex < ActiveRecord::Migration[4.2] def change add_index "services", [:created_at, :id] end diff --git a/db/migrate/20150211172122_add_template_to_service.rb b/db/migrate/20150211172122_add_template_to_service.rb index a3e96b25c56..dd192a0fe76 100644 --- a/db/migrate/20150211172122_add_template_to_service.rb +++ b/db/migrate/20150211172122_add_template_to_service.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTemplateToService < ActiveRecord::Migration +class AddTemplateToService < ActiveRecord::Migration[4.2] def change add_column :services, :template, :boolean, default: false end diff --git a/db/migrate/20150211174341_allow_null_in_services_project_id.rb b/db/migrate/20150211174341_allow_null_in_services_project_id.rb index fea95c79adf..d319b18509a 100644 --- a/db/migrate/20150211174341_allow_null_in_services_project_id.rb +++ b/db/migrate/20150211174341_allow_null_in_services_project_id.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AllowNullInServicesProjectId < ActiveRecord::Migration +class AllowNullInServicesProjectId < ActiveRecord::Migration[4.2] def change change_column :services, :project_id, :integer, null: true end diff --git a/db/migrate/20150213104043_add_twitter_sharing_enabled_to_application_settings.rb b/db/migrate/20150213104043_add_twitter_sharing_enabled_to_application_settings.rb index 334020376e4..7d7b9242cd6 100644 --- a/db/migrate/20150213104043_add_twitter_sharing_enabled_to_application_settings.rb +++ b/db/migrate/20150213104043_add_twitter_sharing_enabled_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTwitterSharingEnabledToApplicationSettings < ActiveRecord::Migration +class AddTwitterSharingEnabledToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :twitter_sharing_enabled, :boolean, default: true end diff --git a/db/migrate/20150213114800_add_hide_no_password_to_user.rb b/db/migrate/20150213114800_add_hide_no_password_to_user.rb index a2af3510b9c..348c0d22aba 100644 --- a/db/migrate/20150213114800_add_hide_no_password_to_user.rb +++ b/db/migrate/20150213114800_add_hide_no_password_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddHideNoPasswordToUser < ActiveRecord::Migration +class AddHideNoPasswordToUser < ActiveRecord::Migration[4.2] def change add_column :users, :hide_no_password, :boolean, default: false end diff --git a/db/migrate/20150213121042_add_password_automatically_set_to_user.rb b/db/migrate/20150213121042_add_password_automatically_set_to_user.rb index 4e84a13f0d2..d0eb753b887 100644 --- a/db/migrate/20150213121042_add_password_automatically_set_to_user.rb +++ b/db/migrate/20150213121042_add_password_automatically_set_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPasswordAutomaticallySetToUser < ActiveRecord::Migration +class AddPasswordAutomaticallySetToUser < ActiveRecord::Migration[4.2] def change add_column :users, :password_automatically_set, :boolean, default: false end diff --git a/db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb b/db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb index 78e9fd0c3a9..88c92092121 100644 --- a/db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb +++ b/db/migrate/20150217123345_add_bitbucket_access_token_and_secret_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddBitbucketAccessTokenAndSecretToUser < ActiveRecord::Migration +class AddBitbucketAccessTokenAndSecretToUser < ActiveRecord::Migration[4.2] def change add_column :users, :bitbucket_access_token, :string add_column :users, :bitbucket_access_token_secret, :string diff --git a/db/migrate/20150219004514_add_events_to_services.rb b/db/migrate/20150219004514_add_events_to_services.rb index 560382c3fa1..7072056adcb 100644 --- a/db/migrate/20150219004514_add_events_to_services.rb +++ b/db/migrate/20150219004514_add_events_to_services.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddEventsToServices < ActiveRecord::Migration +class AddEventsToServices < ActiveRecord::Migration[4.2] def change add_column :services, :push_events, :boolean, :default => true add_column :services, :issues_events, :boolean, :default => true diff --git a/db/migrate/20150223022001_set_missing_last_activity_at.rb b/db/migrate/20150223022001_set_missing_last_activity_at.rb index 300381ad65b..93019893873 100644 --- a/db/migrate/20150223022001_set_missing_last_activity_at.rb +++ b/db/migrate/20150223022001_set_missing_last_activity_at.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class SetMissingLastActivityAt < ActiveRecord::Migration +class SetMissingLastActivityAt < ActiveRecord::Migration[4.2] def up execute "UPDATE projects SET last_activity_at = updated_at WHERE last_activity_at IS NULL" end diff --git a/db/migrate/20150225065047_add_note_events_to_services.rb b/db/migrate/20150225065047_add_note_events_to_services.rb index 7843cabc43b..32c538e8681 100644 --- a/db/migrate/20150225065047_add_note_events_to_services.rb +++ b/db/migrate/20150225065047_add_note_events_to_services.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNoteEventsToServices < ActiveRecord::Migration +class AddNoteEventsToServices < ActiveRecord::Migration[4.2] def change add_column :services, :note_events, :boolean, default: true, null: false end diff --git a/db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb b/db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb index 7d8d65ef2ee..9844e2c52f7 100644 --- a/db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb +++ b/db/migrate/20150301014758_add_restricted_visibility_levels_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddRestrictedVisibilityLevelsToApplicationSettings < ActiveRecord::Migration +class AddRestrictedVisibilityLevelsToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :restricted_visibility_levels, :text end diff --git a/db/migrate/20150306023106_fix_namespace_duplication.rb b/db/migrate/20150306023106_fix_namespace_duplication.rb index ea53a9d71f2..49be152a75c 100644 --- a/db/migrate/20150306023106_fix_namespace_duplication.rb +++ b/db/migrate/20150306023106_fix_namespace_duplication.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class FixNamespaceDuplication < ActiveRecord::Migration +class FixNamespaceDuplication < ActiveRecord::Migration[4.2] def up #fixes path duplication select_all('SELECT MAX(id) max, COUNT(id) cnt, path FROM namespaces GROUP BY path HAVING COUNT(id) > 1').each do |nms| diff --git a/db/migrate/20150306023112_add_unique_index_to_namespace.rb b/db/migrate/20150306023112_add_unique_index_to_namespace.rb index f293a9b643f..11472324cbf 100644 --- a/db/migrate/20150306023112_add_unique_index_to_namespace.rb +++ b/db/migrate/20150306023112_add_unique_index_to_namespace.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddUniqueIndexToNamespace < ActiveRecord::Migration +class AddUniqueIndexToNamespace < ActiveRecord::Migration[4.2] def change remove_index :namespaces, column: :name if index_exists?(:namespaces, :name) remove_index :namespaces, column: :path if index_exists?(:namespaces, :path) diff --git a/db/migrate/20150310194358_add_version_check_to_application_settings.rb b/db/migrate/20150310194358_add_version_check_to_application_settings.rb index 5d3dae6e7d8..cc1b19f302e 100644 --- a/db/migrate/20150310194358_add_version_check_to_application_settings.rb +++ b/db/migrate/20150310194358_add_version_check_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddVersionCheckToApplicationSettings < ActiveRecord::Migration +class AddVersionCheckToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :version_check_enabled, :boolean, default: true end diff --git a/db/migrate/20150313012111_create_subscriptions_table.rb b/db/migrate/20150313012111_create_subscriptions_table.rb index a9a8435330d..37011504b49 100644 --- a/db/migrate/20150313012111_create_subscriptions_table.rb +++ b/db/migrate/20150313012111_create_subscriptions_table.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateSubscriptionsTable < ActiveRecord::Migration +class CreateSubscriptionsTable < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20150320234437_add_location_to_user.rb b/db/migrate/20150320234437_add_location_to_user.rb index df046570361..43504236506 100644 --- a/db/migrate/20150320234437_add_location_to_user.rb +++ b/db/migrate/20150320234437_add_location_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddLocationToUser < ActiveRecord::Migration +class AddLocationToUser < ActiveRecord::Migration[4.2] def change add_column :users, :location, :string end diff --git a/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb b/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb index 9f8b6f4bd59..c8bb75de9aa 100644 --- a/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb +++ b/db/migrate/20150324155957_set_incorrect_assignee_id_to_null.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class SetIncorrectAssigneeIdToNull < ActiveRecord::Migration +class SetIncorrectAssigneeIdToNull < ActiveRecord::Migration[4.2] def up execute "UPDATE issues SET assignee_id = NULL WHERE assignee_id = -1" execute "UPDATE merge_requests SET assignee_id = NULL WHERE assignee_id = -1" diff --git a/db/migrate/20150327122227_add_public_to_key.rb b/db/migrate/20150327122227_add_public_to_key.rb index 33c20d65e03..58d8c16476f 100644 --- a/db/migrate/20150327122227_add_public_to_key.rb +++ b/db/migrate/20150327122227_add_public_to_key.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPublicToKey < ActiveRecord::Migration +class AddPublicToKey < ActiveRecord::Migration[4.2] def change add_column :keys, :public, :boolean, default: false, null: false end diff --git a/db/migrate/20150327150017_add_import_data_to_project.rb b/db/migrate/20150327150017_add_import_data_to_project.rb index 67b1554dfd1..eb8d37081bd 100644 --- a/db/migrate/20150327150017_add_import_data_to_project.rb +++ b/db/migrate/20150327150017_add_import_data_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddImportDataToProject < ActiveRecord::Migration +class AddImportDataToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :import_data, :text end diff --git a/db/migrate/20150327223628_add_devise_two_factor_to_users.rb b/db/migrate/20150327223628_add_devise_two_factor_to_users.rb index eccb0123e77..1e1b9c16a5f 100644 --- a/db/migrate/20150327223628_add_devise_two_factor_to_users.rb +++ b/db/migrate/20150327223628_add_devise_two_factor_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDeviseTwoFactorToUsers < ActiveRecord::Migration +class AddDeviseTwoFactorToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :encrypted_otp_secret, :string add_column :users, :encrypted_otp_secret_iv, :string diff --git a/db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb b/db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb index 4c56a2fb78b..ed5163649da 100644 --- a/db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb +++ b/db/migrate/20150328132231_add_max_attachment_size_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMaxAttachmentSizeToApplicationSettings < ActiveRecord::Migration +class AddMaxAttachmentSizeToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :max_attachment_size, :integer, default: 10, null: false end diff --git a/db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb b/db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb index fdb6d72917e..fa53799e7fd 100644 --- a/db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb +++ b/db/migrate/20150331183602_add_devise_two_factor_backupable_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDeviseTwoFactorBackupableToUsers < ActiveRecord::Migration +class AddDeviseTwoFactorBackupableToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :otp_backup_codes, :text end diff --git a/db/migrate/20150406133311_add_invite_data_to_member.rb b/db/migrate/20150406133311_add_invite_data_to_member.rb index 63d0f184f32..eee991185ab 100644 --- a/db/migrate/20150406133311_add_invite_data_to_member.rb +++ b/db/migrate/20150406133311_add_invite_data_to_member.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddInviteDataToMember < ActiveRecord::Migration +class AddInviteDataToMember < ActiveRecord::Migration[4.2] def up add_column :members, :created_by_id, :integer add_column :members, :invite_email, :string diff --git a/db/migrate/20150411000035_fix_identities.rb b/db/migrate/20150411000035_fix_identities.rb index a10fcc001f4..c876cd8167e 100644 --- a/db/migrate/20150411000035_fix_identities.rb +++ b/db/migrate/20150411000035_fix_identities.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class FixIdentities < ActiveRecord::Migration +class FixIdentities < ActiveRecord::Migration[4.2] def up # Up until now, legacy 'ldap' references in the database were charitably # interpreted to point to the first LDAP server specified in the GitLab diff --git a/db/migrate/20150411180045_rename_buildbox_service.rb b/db/migrate/20150411180045_rename_buildbox_service.rb index 9f3b25c3971..b97c55064f2 100644 --- a/db/migrate/20150411180045_rename_buildbox_service.rb +++ b/db/migrate/20150411180045_rename_buildbox_service.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RenameBuildboxService < ActiveRecord::Migration +class RenameBuildboxService < ActiveRecord::Migration[4.2] def up execute "UPDATE services SET type = 'BuildkiteService' WHERE type = 'BuildboxService';" end diff --git a/db/migrate/20150413192223_add_public_email_to_users.rb b/db/migrate/20150413192223_add_public_email_to_users.rb index 0fed5eaf461..991f0c668c3 100644 --- a/db/migrate/20150413192223_add_public_email_to_users.rb +++ b/db/migrate/20150413192223_add_public_email_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPublicEmailToUsers < ActiveRecord::Migration +class AddPublicEmailToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :public_email, :string, default: "", null: false end diff --git a/db/migrate/20150417121913_create_project_import_data.rb b/db/migrate/20150417121913_create_project_import_data.rb index fc357cbacc8..1dcaf5cb31a 100644 --- a/db/migrate/20150417121913_create_project_import_data.rb +++ b/db/migrate/20150417121913_create_project_import_data.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateProjectImportData < ActiveRecord::Migration +class CreateProjectImportData < ActiveRecord::Migration[4.2] def change create_table :project_import_data do |t| t.references :project diff --git a/db/migrate/20150417122318_remove_import_data_from_project.rb b/db/migrate/20150417122318_remove_import_data_from_project.rb index 5a008218fa5..c9a225a9d17 100644 --- a/db/migrate/20150417122318_remove_import_data_from_project.rb +++ b/db/migrate/20150417122318_remove_import_data_from_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveImportDataFromProject < ActiveRecord::Migration +class RemoveImportDataFromProject < ActiveRecord::Migration[4.2] def up remove_column :projects, :import_data end diff --git a/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb b/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb index 3445e9ce59e..a2034d5bce5 100644 --- a/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb +++ b/db/migrate/20150421120000_remove_periods_at_ends_of_usernames.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemovePeriodsAtEndsOfUsernames < ActiveRecord::Migration +class RemovePeriodsAtEndsOfUsernames < ActiveRecord::Migration[4.2] include Gitlab::ShellAdapter class Namespace < ActiveRecord::Base @@ -71,7 +71,7 @@ class RemovePeriodsAtEndsOfUsernames < ActiveRecord::Migration begin gitlab_shell.rm_satellites(path_was) # We cannot send update instructions since models and mailers - # can't safely be used from migrations as they may be written for + # can't safely be used from migrations as they may be written for # later versions of the database. # send_update_instructions rescue diff --git a/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb b/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb index 129ce4d04af..330d70aa4bb 100644 --- a/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb +++ b/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDefaultProjectVisibililtyToApplicationSettings < ActiveRecord::Migration +class AddDefaultProjectVisibililtyToApplicationSettings < ActiveRecord::Migration[4.2] def up add_column :application_settings, :default_project_visibility, :integer visibility = Settings.gitlab.default_projects_features['visibility_level'] diff --git a/db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb b/db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb index 8f352414ffd..93df7805419 100644 --- a/db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +++ b/db/migrate/20150425164646_gitlab_change_collation_for_tag_names.acts_as_taggable_on_engine.rb @@ -2,7 +2,7 @@ # This migration is a duplicate of 20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb # It shold be applied before the index additions to ensure that `name` is case sensitive. -class GitlabChangeCollationForTagNames < ActiveRecord::Migration +class GitlabChangeCollationForTagNames < ActiveRecord::Migration[4.2] def up if ActsAsTaggableOn::Utils.using_mysql? execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;") diff --git a/db/migrate/20150425164647_remove_duplicate_tags.rb b/db/migrate/20150425164647_remove_duplicate_tags.rb index e77623bf507..91b696b5bf4 100644 --- a/db/migrate/20150425164647_remove_duplicate_tags.rb +++ b/db/migrate/20150425164647_remove_duplicate_tags.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveDuplicateTags < ActiveRecord::Migration +class RemoveDuplicateTags < ActiveRecord::Migration[4.2] def up select_all("SELECT name, COUNT(id) as cnt FROM tags GROUP BY name HAVING COUNT(id) > 1").each do |tag| tag_name = quote_string(tag["name"]) @@ -13,6 +13,6 @@ class RemoveDuplicateTags < ActiveRecord::Migration end def down - + end end diff --git a/db/migrate/20150425164648_add_missing_unique_indices.acts_as_taggable_on_engine.rb b/db/migrate/20150425164648_add_missing_unique_indices.acts_as_taggable_on_engine.rb index cbff98cdbc4..d1951f640bb 100644 --- a/db/migrate/20150425164648_add_missing_unique_indices.acts_as_taggable_on_engine.rb +++ b/db/migrate/20150425164648_add_missing_unique_indices.acts_as_taggable_on_engine.rb @@ -1,6 +1,6 @@ # rubocop:disable all # This migration comes from acts_as_taggable_on_engine (originally 2) -class AddMissingUniqueIndices < ActiveRecord::Migration +class AddMissingUniqueIndices < ActiveRecord::Migration[4.2] def self.up add_index :tags, :name, unique: true diff --git a/db/migrate/20150425164649_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb b/db/migrate/20150425164649_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb index 1568d2dd4ce..b9af394f09b 100644 --- a/db/migrate/20150425164649_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +++ b/db/migrate/20150425164649_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb @@ -1,6 +1,6 @@ # rubocop:disable all # This migration comes from acts_as_taggable_on_engine (originally 3) -class AddTaggingsCounterCacheToTags < ActiveRecord::Migration +class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2] def self.up add_column :tags, :taggings_count, :integer, default: 0 diff --git a/db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb b/db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb index 88829b87711..cf964397c6e 100644 --- a/db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb +++ b/db/migrate/20150425164650_add_missing_taggable_index.acts_as_taggable_on_engine.rb @@ -1,6 +1,6 @@ # rubocop:disable all # This migration comes from acts_as_taggable_on_engine (originally 4) -class AddMissingTaggableIndex < ActiveRecord::Migration +class AddMissingTaggableIndex < ActiveRecord::Migration[4.2] def self.up add_index :taggings, [:taggable_id, :taggable_type, :context] end diff --git a/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb b/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb index 642c4745321..7a090dafc9a 100644 --- a/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +++ b/db/migrate/20150425164651_change_collation_for_tag_names.acts_as_taggable_on_engine.rb @@ -2,7 +2,7 @@ # This migration comes from acts_as_taggable_on_engine (originally 5) # This migration is added to circumvent issue #623 and have special characters # work properly -class ChangeCollationForTagNames < ActiveRecord::Migration +class ChangeCollationForTagNames < ActiveRecord::Migration[4.2] def up if ActsAsTaggableOn::Utils.using_mysql? execute("ALTER TABLE tags MODIFY name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin;") diff --git a/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb b/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb index dd13def4176..2fd388a92b0 100644 --- a/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb +++ b/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDefaultSnippetVisibilityToAppSettings < ActiveRecord::Migration +class AddDefaultSnippetVisibilityToAppSettings < ActiveRecord::Migration[4.2] def up add_column :application_settings, :default_snippet_visibility, :integer visibility = Settings.gitlab.default_projects_features['visibility_level'] diff --git a/db/migrate/20150429002313_remove_abandoned_group_members_records.rb b/db/migrate/20150429002313_remove_abandoned_group_members_records.rb index d2c7f3c442e..2b4cb040a28 100644 --- a/db/migrate/20150429002313_remove_abandoned_group_members_records.rb +++ b/db/migrate/20150429002313_remove_abandoned_group_members_records.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveAbandonedGroupMembersRecords < ActiveRecord::Migration +class RemoveAbandonedGroupMembersRecords < ActiveRecord::Migration[4.2] def up execute("DELETE FROM members WHERE type = 'GroupMember' AND source_id NOT IN(\ SELECT id FROM namespaces WHERE type='Group')") diff --git a/db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb b/db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb index b63ea9aec7a..40f6326b274 100644 --- a/db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb +++ b/db/migrate/20150502064022_add_restricted_signup_domains_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddRestrictedSignupDomainsToApplicationSettings < ActiveRecord::Migration +class AddRestrictedSignupDomainsToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :restricted_signup_domains, :text end diff --git a/db/migrate/20150509180749_convert_legacy_reference_notes.rb b/db/migrate/20150509180749_convert_legacy_reference_notes.rb index cd8bf90108d..f5c2deedf55 100644 --- a/db/migrate/20150509180749_convert_legacy_reference_notes.rb +++ b/db/migrate/20150509180749_convert_legacy_reference_notes.rb @@ -6,7 +6,7 @@ # becomes # # mentioned in 54f7727c850972f0401c1312a7c4a6a380de5666 -class ConvertLegacyReferenceNotes < ActiveRecord::Migration +class ConvertLegacyReferenceNotes < ActiveRecord::Migration[4.2] def up execute %q{UPDATE notes SET note = trim(both '_' from note) WHERE system = true AND note LIKE '\_%\_'} end diff --git a/db/migrate/20150516060434_add_note_events_to_web_hooks.rb b/db/migrate/20150516060434_add_note_events_to_web_hooks.rb index bf72e5e2e3a..ddf26240b8b 100644 --- a/db/migrate/20150516060434_add_note_events_to_web_hooks.rb +++ b/db/migrate/20150516060434_add_note_events_to_web_hooks.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNoteEventsToWebHooks < ActiveRecord::Migration +class AddNoteEventsToWebHooks < ActiveRecord::Migration[4.2] def up add_column :web_hooks, :note_events, :boolean, default: false, null: false end diff --git a/db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb b/db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb index 9b02eda56ab..631f4d86a49 100644 --- a/db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb +++ b/db/migrate/20150529111607_add_user_oauth_applications_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddUserOauthApplicationsToApplicationSettings < ActiveRecord::Migration +class AddUserOauthApplicationsToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :user_oauth_applications, :bool, default: true end diff --git a/db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb b/db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb index 833c36de52d..ecb9355b754 100644 --- a/db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb +++ b/db/migrate/20150529150354_add_after_sign_out_path_for_application_settings.rb @@ -1,6 +1,6 @@ # rubocop:disable all -class AddAfterSignOutPathForApplicationSettings < ActiveRecord::Migration +class AddAfterSignOutPathForApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :after_sign_out_path, :string end -end
\ No newline at end of file +end diff --git a/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb b/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb index 1f5cf1fe5f1..ec2b247a95e 100644 --- a/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb +++ b/db/migrate/20150609141121_add_session_expire_delay_for_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddSessionExpireDelayForApplicationSettings < ActiveRecord::Migration +class AddSessionExpireDelayForApplicationSettings < ActiveRecord::Migration[4.2] def change unless column_exists?(:application_settings, :session_expire_delay) add_column :application_settings, :session_expire_delay, :integer, default: 10080, null: false diff --git a/db/migrate/20150610065936_add_dashboard_to_users.rb b/db/migrate/20150610065936_add_dashboard_to_users.rb index df38472f893..a0bf5f31f00 100644 --- a/db/migrate/20150610065936_add_dashboard_to_users.rb +++ b/db/migrate/20150610065936_add_dashboard_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDashboardToUsers < ActiveRecord::Migration +class AddDashboardToUsers < ActiveRecord::Migration[4.2] def up add_column :users, :dashboard, :integer, default: 0 end diff --git a/db/migrate/20150620233230_add_default_otp_required_for_login_value.rb b/db/migrate/20150620233230_add_default_otp_required_for_login_value.rb index da0fd457a34..e538c2a9f68 100644 --- a/db/migrate/20150620233230_add_default_otp_required_for_login_value.rb +++ b/db/migrate/20150620233230_add_default_otp_required_for_login_value.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDefaultOtpRequiredForLoginValue < ActiveRecord::Migration +class AddDefaultOtpRequiredForLoginValue < ActiveRecord::Migration[4.2] def up execute %q{UPDATE users SET otp_required_for_login = FALSE WHERE otp_required_for_login IS NULL} diff --git a/db/migrate/20150713160110_add_project_view_to_users.rb b/db/migrate/20150713160110_add_project_view_to_users.rb index 0de5a93035c..fea63576187 100644 --- a/db/migrate/20150713160110_add_project_view_to_users.rb +++ b/db/migrate/20150713160110_add_project_view_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddProjectViewToUsers < ActiveRecord::Migration +class AddProjectViewToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :project_view, :integer, default: 0 end diff --git a/db/migrate/20150717130904_add_commits_count_to_project.rb b/db/migrate/20150717130904_add_commits_count_to_project.rb index 5799e068c69..df6c88f2961 100644 --- a/db/migrate/20150717130904_add_commits_count_to_project.rb +++ b/db/migrate/20150717130904_add_commits_count_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCommitsCountToProject < ActiveRecord::Migration +class AddCommitsCountToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :commit_count, :integer, default: 0 end diff --git a/db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb b/db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb index be30e881c74..b1dda192594 100644 --- a/db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb +++ b/db/migrate/20150730122406_add_updated_by_to_issuables_and_notes.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddUpdatedByToIssuablesAndNotes < ActiveRecord::Migration +class AddUpdatedByToIssuablesAndNotes < ActiveRecord::Migration[4.2] def change add_column :notes, :updated_by_id, :integer add_column :issues, :updated_by_id, :integer diff --git a/db/migrate/20150806104937_create_abuse_reports.rb b/db/migrate/20150806104937_create_abuse_reports.rb index 52aed9e1d1d..be4fe8d1cfd 100644 --- a/db/migrate/20150806104937_create_abuse_reports.rb +++ b/db/migrate/20150806104937_create_abuse_reports.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateAbuseReports < ActiveRecord::Migration +class CreateAbuseReports < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20150812080800_add_settings_import_sources.rb b/db/migrate/20150812080800_add_settings_import_sources.rb index 07f417fa3e3..59db31c868a 100644 --- a/db/migrate/20150812080800_add_settings_import_sources.rb +++ b/db/migrate/20150812080800_add_settings_import_sources.rb @@ -1,7 +1,7 @@ # rubocop:disable all require 'yaml' -class AddSettingsImportSources < ActiveRecord::Migration +class AddSettingsImportSources < ActiveRecord::Migration[4.2] def change unless column_exists?(:application_settings, :import_sources) add_column :application_settings, :import_sources, :text diff --git a/db/migrate/20150814065925_remove_oauth_tokens_from_users.rb b/db/migrate/20150814065925_remove_oauth_tokens_from_users.rb index 7eaa7eda311..f0080ee0b46 100644 --- a/db/migrate/20150814065925_remove_oauth_tokens_from_users.rb +++ b/db/migrate/20150814065925_remove_oauth_tokens_from_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveOauthTokensFromUsers < ActiveRecord::Migration +class RemoveOauthTokensFromUsers < ActiveRecord::Migration[4.2] def change remove_column :users, :github_access_token, :string remove_column :users, :gitlab_access_token, :string diff --git a/db/migrate/20150817163600_deduplicate_user_identities.rb b/db/migrate/20150817163600_deduplicate_user_identities.rb index b0cfad7d20f..973a87e07ea 100644 --- a/db/migrate/20150817163600_deduplicate_user_identities.rb +++ b/db/migrate/20150817163600_deduplicate_user_identities.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class DeduplicateUserIdentities < ActiveRecord::Migration +class DeduplicateUserIdentities < ActiveRecord::Migration[4.2] def change execute 'DROP TABLE IF EXISTS tt_migration_DeduplicateUserIdentities;' execute 'CREATE TABLE tt_migration_DeduplicateUserIdentities AS SELECT id,provider,user_id FROM identities;' diff --git a/db/migrate/20150818213832_add_sent_notifications.rb b/db/migrate/20150818213832_add_sent_notifications.rb index fa0c3ce0acf..dd765d500f5 100644 --- a/db/migrate/20150818213832_add_sent_notifications.rb +++ b/db/migrate/20150818213832_add_sent_notifications.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddSentNotifications < ActiveRecord::Migration +class AddSentNotifications < ActiveRecord::Migration[4.2] def change create_table :sent_notifications do |t| t.references :project diff --git a/db/migrate/20150824002011_add_enable_ssl_verification.rb b/db/migrate/20150824002011_add_enable_ssl_verification.rb index 6e992f08834..2d877914f39 100644 --- a/db/migrate/20150824002011_add_enable_ssl_verification.rb +++ b/db/migrate/20150824002011_add_enable_ssl_verification.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddEnableSslVerification < ActiveRecord::Migration +class AddEnableSslVerification < ActiveRecord::Migration[4.2] def change add_column :web_hooks, :enable_ssl_verification, :boolean, default: false end diff --git a/db/migrate/20150826001931_add_ci_tables.rb b/db/migrate/20150826001931_add_ci_tables.rb index d1f8506d1fe..aa2af44a15b 100644 --- a/db/migrate/20150826001931_add_ci_tables.rb +++ b/db/migrate/20150826001931_add_ci_tables.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCiTables < ActiveRecord::Migration +class AddCiTables < ActiveRecord::Migration[4.2] def change create_table "ci_application_settings", force: true do |t| t.boolean "all_broken_builds" diff --git a/db/migrate/20150902001023_add_template_to_label.rb b/db/migrate/20150902001023_add_template_to_label.rb index 0f6ae8d6cc3..514dbd46245 100644 --- a/db/migrate/20150902001023_add_template_to_label.rb +++ b/db/migrate/20150902001023_add_template_to_label.rb @@ -1,6 +1,6 @@ # rubocop:disable all -class AddTemplateToLabel < ActiveRecord::Migration +class AddTemplateToLabel < ActiveRecord::Migration[4.2] def change add_column :labels, :template, :boolean, default: false end -end
\ No newline at end of file +end diff --git a/db/migrate/20150914215247_add_ci_tags.rb b/db/migrate/20150914215247_add_ci_tags.rb index b647bc9c8a2..9afa4540540 100644 --- a/db/migrate/20150914215247_add_ci_tags.rb +++ b/db/migrate/20150914215247_add_ci_tags.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCiTags < ActiveRecord::Migration +class AddCiTags < ActiveRecord::Migration[4.2] def change create_table "ci_taggings", force: true do |t| t.integer "tag_id" diff --git a/db/migrate/20150915001905_enable_ssl_verification_by_default.rb b/db/migrate/20150915001905_enable_ssl_verification_by_default.rb index 3f070139418..49deb872694 100644 --- a/db/migrate/20150915001905_enable_ssl_verification_by_default.rb +++ b/db/migrate/20150915001905_enable_ssl_verification_by_default.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class EnableSslVerificationByDefault < ActiveRecord::Migration +class EnableSslVerificationByDefault < ActiveRecord::Migration[4.2] def change change_column :web_hooks, :enable_ssl_verification, :boolean, default: true end diff --git a/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb b/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb index ea2ab6e4093..33bf2dc41c1 100644 --- a/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb +++ b/db/migrate/20150916000405_enable_ssl_verification_for_web_hooks.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class EnableSslVerificationForWebHooks < ActiveRecord::Migration +class EnableSslVerificationForWebHooks < ActiveRecord::Migration[4.2] def up execute("UPDATE web_hooks SET enable_ssl_verification = true") end diff --git a/db/migrate/20150916114643_add_help_page_text_to_application_settings.rb b/db/migrate/20150916114643_add_help_page_text_to_application_settings.rb index a504f25b1be..d2e6348f166 100644 --- a/db/migrate/20150916114643_add_help_page_text_to_application_settings.rb +++ b/db/migrate/20150916114643_add_help_page_text_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddHelpPageTextToApplicationSettings < ActiveRecord::Migration +class AddHelpPageTextToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :help_page_text, :text end diff --git a/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb b/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb index a18ed93cf37..bf78aacd9f4 100644 --- a/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb +++ b/db/migrate/20150916145038_add_index_for_committed_at_and_id.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexForCommittedAtAndId < ActiveRecord::Migration +class AddIndexForCommittedAtAndId < ActiveRecord::Migration[4.2] def change add_index :ci_commits, [:project_id, :committed_at, :id] end diff --git a/db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb b/db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb index c9b6e035122..0f48432b1be 100644 --- a/db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb +++ b/db/migrate/20150918084513_add_ci_enabled_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCiEnabledToApplicationSettings < ActiveRecord::Migration +class AddCiEnabledToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :ci_enabled, :boolean, null: false, default: true end diff --git a/db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb b/db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb index e1818b566d7..f3472187f8d 100644 --- a/db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb +++ b/db/migrate/20150918161719_remove_invalid_milestones_from_merge_requests.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveInvalidMilestonesFromMergeRequests < ActiveRecord::Migration +class RemoveInvalidMilestonesFromMergeRequests < ActiveRecord::Migration[4.2] def up execute("UPDATE merge_requests SET milestone_id = NULL where milestone_id NOT IN (SELECT id FROM milestones)") end diff --git a/db/migrate/20150920010715_add_consumed_timestep_to_users.rb b/db/migrate/20150920010715_add_consumed_timestep_to_users.rb index e6975f5b9fe..92383b0f34e 100644 --- a/db/migrate/20150920010715_add_consumed_timestep_to_users.rb +++ b/db/migrate/20150920010715_add_consumed_timestep_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddConsumedTimestepToUsers < ActiveRecord::Migration +class AddConsumedTimestepToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :consumed_timestep, :integer end diff --git a/db/migrate/20150920161119_add_line_code_to_sent_notification.rb b/db/migrate/20150920161119_add_line_code_to_sent_notification.rb index 1bcb06e4bda..8198f26442d 100644 --- a/db/migrate/20150920161119_add_line_code_to_sent_notification.rb +++ b/db/migrate/20150920161119_add_line_code_to_sent_notification.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddLineCodeToSentNotification < ActiveRecord::Migration +class AddLineCodeToSentNotification < ActiveRecord::Migration[4.2] def change add_column :sent_notifications, :line_code, :string end diff --git a/db/migrate/20150924125150_add_project_id_to_ci_commit.rb b/db/migrate/20150924125150_add_project_id_to_ci_commit.rb index 905332b7dc7..869a3d2be02 100644 --- a/db/migrate/20150924125150_add_project_id_to_ci_commit.rb +++ b/db/migrate/20150924125150_add_project_id_to_ci_commit.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddProjectIdToCiCommit < ActiveRecord::Migration +class AddProjectIdToCiCommit < ActiveRecord::Migration[4.2] def up add_column :ci_commits, :gl_project_id, :integer end diff --git a/db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb b/db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb index fb0e0ba1fa5..323ba0bd346 100644 --- a/db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb +++ b/db/migrate/20150924125436_migrate_project_id_for_ci_commits.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateProjectIdForCiCommits < ActiveRecord::Migration +class MigrateProjectIdForCiCommits < ActiveRecord::Migration[4.2] def up subquery = 'SELECT gitlab_id FROM ci_projects WHERE ci_projects.id = ci_commits.project_id' execute("UPDATE ci_commits SET gl_project_id=(#{subquery}) WHERE gl_project_id IS NULL") diff --git a/db/migrate/20150930001110_merge_request_error_field.rb b/db/migrate/20150930001110_merge_request_error_field.rb index 71a8ae3938a..0e0ffe5a930 100644 --- a/db/migrate/20150930001110_merge_request_error_field.rb +++ b/db/migrate/20150930001110_merge_request_error_field.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MergeRequestErrorField < ActiveRecord::Migration +class MergeRequestErrorField < ActiveRecord::Migration[4.2] def up add_column :merge_requests, :merge_error, :string end diff --git a/db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb b/db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb index 229c9942b50..289e5fc7b36 100644 --- a/db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb +++ b/db/migrate/20150930095736_add_null_to_name_for_ci_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNullToNameForCiProjects < ActiveRecord::Migration +class AddNullToNameForCiProjects < ActiveRecord::Migration[4.2] def up change_column_null :ci_projects, :name, true end diff --git a/db/migrate/20150930110012_add_group_share_lock.rb b/db/migrate/20150930110012_add_group_share_lock.rb index 96938bf9ab6..62755765457 100644 --- a/db/migrate/20150930110012_add_group_share_lock.rb +++ b/db/migrate/20150930110012_add_group_share_lock.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddGroupShareLock < ActiveRecord::Migration +class AddGroupShareLock < ActiveRecord::Migration[4.2] def change add_column :namespaces, :share_with_group_lock, :boolean, default: false end diff --git a/db/migrate/20151002112914_add_stage_idx_to_builds.rb b/db/migrate/20151002112914_add_stage_idx_to_builds.rb index 4297ba0e7c8..575c0fd8f70 100644 --- a/db/migrate/20151002112914_add_stage_idx_to_builds.rb +++ b/db/migrate/20151002112914_add_stage_idx_to_builds.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddStageIdxToBuilds < ActiveRecord::Migration +class AddStageIdxToBuilds < ActiveRecord::Migration[4.2] def change add_column :ci_builds, :stage_idx, :integer end diff --git a/db/migrate/20151002121400_add_index_for_builds.rb b/db/migrate/20151002121400_add_index_for_builds.rb index bd945c54540..5e6f80a1d3d 100644 --- a/db/migrate/20151002121400_add_index_for_builds.rb +++ b/db/migrate/20151002121400_add_index_for_builds.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexForBuilds < ActiveRecord::Migration +class AddIndexForBuilds < ActiveRecord::Migration[4.2] def up add_index :ci_builds, [:commit_id, :stage_idx, :created_at] end diff --git a/db/migrate/20151002122929_add_ref_and_tag_to_builds.rb b/db/migrate/20151002122929_add_ref_and_tag_to_builds.rb index 3c0fcf6c45d..6ffe6901194 100644 --- a/db/migrate/20151002122929_add_ref_and_tag_to_builds.rb +++ b/db/migrate/20151002122929_add_ref_and_tag_to_builds.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddRefAndTagToBuilds < ActiveRecord::Migration +class AddRefAndTagToBuilds < ActiveRecord::Migration[4.2] def change add_column :ci_builds, :tag, :boolean add_column :ci_builds, :ref, :string diff --git a/db/migrate/20151002122943_migrate_ref_and_tag_to_build.rb b/db/migrate/20151002122943_migrate_ref_and_tag_to_build.rb index 52217ce5af2..b4038e6fa83 100644 --- a/db/migrate/20151002122943_migrate_ref_and_tag_to_build.rb +++ b/db/migrate/20151002122943_migrate_ref_and_tag_to_build.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateRefAndTagToBuild < ActiveRecord::Migration +class MigrateRefAndTagToBuild < ActiveRecord::Migration[4.2] def change execute('UPDATE ci_builds SET ref=(SELECT ref FROM ci_commits WHERE ci_commits.id = ci_builds.commit_id) WHERE ref IS NULL') execute('UPDATE ci_builds SET tag=(SELECT tag FROM ci_commits WHERE ci_commits.id = ci_builds.commit_id) WHERE tag IS NULL') diff --git a/db/migrate/20151005075649_add_user_id_to_build.rb b/db/migrate/20151005075649_add_user_id_to_build.rb index be9d403e002..5c445f3d477 100644 --- a/db/migrate/20151005075649_add_user_id_to_build.rb +++ b/db/migrate/20151005075649_add_user_id_to_build.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddUserIdToBuild < ActiveRecord::Migration +class AddUserIdToBuild < ActiveRecord::Migration[4.2] def change add_column :ci_builds, :user_id, :integer end diff --git a/db/migrate/20151005150751_add_layout_option_for_users.rb b/db/migrate/20151005150751_add_layout_option_for_users.rb index 7e68606969f..edcbe110e47 100644 --- a/db/migrate/20151005150751_add_layout_option_for_users.rb +++ b/db/migrate/20151005150751_add_layout_option_for_users.rb @@ -1,6 +1,6 @@ # rubocop:disable all -class AddLayoutOptionForUsers < ActiveRecord::Migration +class AddLayoutOptionForUsers < ActiveRecord::Migration[4.2] def change add_column :users, :layout, :integer, default: 0 end -end
\ No newline at end of file +end diff --git a/db/migrate/20151005162154_remove_ci_enabled_from_application_settings.rb b/db/migrate/20151005162154_remove_ci_enabled_from_application_settings.rb index 07dba598749..a8e6e54062a 100644 --- a/db/migrate/20151005162154_remove_ci_enabled_from_application_settings.rb +++ b/db/migrate/20151005162154_remove_ci_enabled_from_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveCiEnabledFromApplicationSettings < ActiveRecord::Migration +class RemoveCiEnabledFromApplicationSettings < ActiveRecord::Migration[4.2] def change remove_column :application_settings, :ci_enabled, :boolean, null: false, default: true end diff --git a/db/migrate/20151007120511_namespaces_projects_path_lower_indexes.rb b/db/migrate/20151007120511_namespaces_projects_path_lower_indexes.rb index 38208e59804..d6c21bf8639 100644 --- a/db/migrate/20151007120511_namespaces_projects_path_lower_indexes.rb +++ b/db/migrate/20151007120511_namespaces_projects_path_lower_indexes.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class NamespacesProjectsPathLowerIndexes < ActiveRecord::Migration +class NamespacesProjectsPathLowerIndexes < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up diff --git a/db/migrate/20151008110232_add_users_lower_username_email_indexes.rb b/db/migrate/20151008110232_add_users_lower_username_email_indexes.rb index 6080d2a0fcf..2ba1a6146e2 100644 --- a/db/migrate/20151008110232_add_users_lower_username_email_indexes.rb +++ b/db/migrate/20151008110232_add_users_lower_username_email_indexes.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddUsersLowerUsernameEmailIndexes < ActiveRecord::Migration +class AddUsersLowerUsernameEmailIndexes < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up diff --git a/db/migrate/20151008123042_add_type_and_description_to_builds.rb b/db/migrate/20151008123042_add_type_and_description_to_builds.rb index a19eb6c6c49..309655cf195 100644 --- a/db/migrate/20151008123042_add_type_and_description_to_builds.rb +++ b/db/migrate/20151008123042_add_type_and_description_to_builds.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTypeAndDescriptionToBuilds < ActiveRecord::Migration +class AddTypeAndDescriptionToBuilds < ActiveRecord::Migration[4.2] def change add_column :ci_builds, :type, :string add_column :ci_builds, :target_url, :string diff --git a/db/migrate/20151008130321_migrate_name_to_description_for_builds.rb b/db/migrate/20151008130321_migrate_name_to_description_for_builds.rb index 306fa7092ea..f4445277a6f 100644 --- a/db/migrate/20151008130321_migrate_name_to_description_for_builds.rb +++ b/db/migrate/20151008130321_migrate_name_to_description_for_builds.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateNameToDescriptionForBuilds < ActiveRecord::Migration +class MigrateNameToDescriptionForBuilds < ActiveRecord::Migration[4.2] def change execute("UPDATE ci_builds SET type='Ci::Build' WHERE type IS NULL") end diff --git a/db/migrate/20151008143519_add_admin_notification_email_setting.rb b/db/migrate/20151008143519_add_admin_notification_email_setting.rb index f48ec9aa4a6..fcde4519764 100644 --- a/db/migrate/20151008143519_add_admin_notification_email_setting.rb +++ b/db/migrate/20151008143519_add_admin_notification_email_setting.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddAdminNotificationEmailSetting < ActiveRecord::Migration +class AddAdminNotificationEmailSetting < ActiveRecord::Migration[4.2] def change add_column :application_settings, :admin_notification_email, :string end diff --git a/db/migrate/20151012173029_set_jira_service_api_url.rb b/db/migrate/20151012173029_set_jira_service_api_url.rb index 2b6f61428c0..91cc6bbc783 100644 --- a/db/migrate/20151012173029_set_jira_service_api_url.rb +++ b/db/migrate/20151012173029_set_jira_service_api_url.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class SetJiraServiceApiUrl < ActiveRecord::Migration +class SetJiraServiceApiUrl < ActiveRecord::Migration[4.2] # This migration can be performed online without errors, but some Jira API calls may be missed # when doing so because api_url is not yet available. diff --git a/db/migrate/20151013092124_add_artifacts_file_to_builds.rb b/db/migrate/20151013092124_add_artifacts_file_to_builds.rb index a54ac9d57a4..d1eb307b5a8 100644 --- a/db/migrate/20151013092124_add_artifacts_file_to_builds.rb +++ b/db/migrate/20151013092124_add_artifacts_file_to_builds.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddArtifactsFileToBuilds < ActiveRecord::Migration +class AddArtifactsFileToBuilds < ActiveRecord::Migration[4.2] def change add_column :ci_builds, :artifacts_file, :text end diff --git a/db/migrate/20151016131433_add_ci_projects_gl_project_id_index.rb b/db/migrate/20151016131433_add_ci_projects_gl_project_id_index.rb index eb3351eb767..a9290fef11a 100644 --- a/db/migrate/20151016131433_add_ci_projects_gl_project_id_index.rb +++ b/db/migrate/20151016131433_add_ci_projects_gl_project_id_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCiProjectsGlProjectIdIndex < ActiveRecord::Migration +class AddCiProjectsGlProjectIdIndex < ActiveRecord::Migration[4.2] def change add_index :ci_commits, :gl_project_id end diff --git a/db/migrate/20151016195451_add_ci_builds_and_projects_indexes.rb b/db/migrate/20151016195451_add_ci_builds_and_projects_indexes.rb index 899e004d610..c8a79f25ae5 100644 --- a/db/migrate/20151016195451_add_ci_builds_and_projects_indexes.rb +++ b/db/migrate/20151016195451_add_ci_builds_and_projects_indexes.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCiBuildsAndProjectsIndexes < ActiveRecord::Migration +class AddCiBuildsAndProjectsIndexes < ActiveRecord::Migration[4.2] def change add_index :ci_projects, :gitlab_id add_index :ci_projects, :shared_runners_enabled diff --git a/db/migrate/20151016195706_add_notes_line_code_index.rb b/db/migrate/20151016195706_add_notes_line_code_index.rb index 3298630c1e8..0a3ad103009 100644 --- a/db/migrate/20151016195706_add_notes_line_code_index.rb +++ b/db/migrate/20151016195706_add_notes_line_code_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNotesLineCodeIndex < ActiveRecord::Migration +class AddNotesLineCodeIndex < ActiveRecord::Migration[4.2] def change add_index :notes, :line_code end diff --git a/db/migrate/20151019111551_fix_build_tags.rb b/db/migrate/20151019111551_fix_build_tags.rb index 8c05acfc190..ab9394438b4 100644 --- a/db/migrate/20151019111551_fix_build_tags.rb +++ b/db/migrate/20151019111551_fix_build_tags.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class FixBuildTags < ActiveRecord::Migration +class FixBuildTags < ActiveRecord::Migration[4.2] def up execute("UPDATE taggings SET taggable_type='CommitStatus' WHERE taggable_type='Ci::Build'") end diff --git a/db/migrate/20151019111703_fail_build_without_names.rb b/db/migrate/20151019111703_fail_build_without_names.rb index 362e31eb435..631c5b544d0 100644 --- a/db/migrate/20151019111703_fail_build_without_names.rb +++ b/db/migrate/20151019111703_fail_build_without_names.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class FailBuildWithoutNames < ActiveRecord::Migration +class FailBuildWithoutNames < ActiveRecord::Migration[4.2] def up execute("UPDATE ci_builds SET status='failed' WHERE name IS NULL AND status='pending'") end diff --git a/db/migrate/20151020145526_add_services_template_index.rb b/db/migrate/20151020145526_add_services_template_index.rb index 14ff07bd726..24c373855e2 100644 --- a/db/migrate/20151020145526_add_services_template_index.rb +++ b/db/migrate/20151020145526_add_services_template_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddServicesTemplateIndex < ActiveRecord::Migration +class AddServicesTemplateIndex < ActiveRecord::Migration[4.2] def change add_index :services, :template end diff --git a/db/migrate/20151020173516_ci_limits_to_mysql.rb b/db/migrate/20151020173516_ci_limits_to_mysql.rb index 5314611cbcd..31e90ec4c8a 100644 --- a/db/migrate/20151020173516_ci_limits_to_mysql.rb +++ b/db/migrate/20151020173516_ci_limits_to_mysql.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CiLimitsToMysql < ActiveRecord::Migration +class CiLimitsToMysql < ActiveRecord::Migration[4.2] def change return unless ActiveRecord::Base.configurations[Rails.env]['adapter'] =~ /^mysql/ diff --git a/db/migrate/20151020173906_add_ci_builds_index_for_status.rb b/db/migrate/20151020173906_add_ci_builds_index_for_status.rb index 81a31e46ff8..231fc4f2a17 100644 --- a/db/migrate/20151020173906_add_ci_builds_index_for_status.rb +++ b/db/migrate/20151020173906_add_ci_builds_index_for_status.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCiBuildsIndexForStatus < ActiveRecord::Migration +class AddCiBuildsIndexForStatus < ActiveRecord::Migration[4.2] def change add_index :ci_builds, [:commit_id, :status, :type] end diff --git a/db/migrate/20151023112551_fail_build_with_empty_name.rb b/db/migrate/20151023112551_fail_build_with_empty_name.rb index 0666dfeaef4..b3960b9ec56 100644 --- a/db/migrate/20151023112551_fail_build_with_empty_name.rb +++ b/db/migrate/20151023112551_fail_build_with_empty_name.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class FailBuildWithEmptyName < ActiveRecord::Migration +class FailBuildWithEmptyName < ActiveRecord::Migration[4.2] def up execute("UPDATE ci_builds SET status='failed' WHERE (name IS NULL OR name='') AND status='pending'") end diff --git a/db/migrate/20151023144219_remove_satellites.rb b/db/migrate/20151023144219_remove_satellites.rb index 98fe0bd7d1d..acea5815734 100644 --- a/db/migrate/20151023144219_remove_satellites.rb +++ b/db/migrate/20151023144219_remove_satellites.rb @@ -1,7 +1,7 @@ # rubocop:disable all require 'fileutils' -class RemoveSatellites < ActiveRecord::Migration +class RemoveSatellites < ActiveRecord::Migration[4.2] def up satellites = Gitlab.config['satellites'] return if satellites.nil? diff --git a/db/migrate/20151026182941_add_project_path_index.rb b/db/migrate/20151026182941_add_project_path_index.rb index 117f65c1a1b..bf0444450cd 100644 --- a/db/migrate/20151026182941_add_project_path_index.rb +++ b/db/migrate/20151026182941_add_project_path_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddProjectPathIndex < ActiveRecord::Migration +class AddProjectPathIndex < ActiveRecord::Migration[4.2] def up add_index :projects, :path end diff --git a/db/migrate/20151028152939_add_merge_when_build_succeeds_to_merge_request.rb b/db/migrate/20151028152939_add_merge_when_build_succeeds_to_merge_request.rb index 4a989669464..5b11a430e30 100644 --- a/db/migrate/20151028152939_add_merge_when_build_succeeds_to_merge_request.rb +++ b/db/migrate/20151028152939_add_merge_when_build_succeeds_to_merge_request.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMergeWhenBuildSucceedsToMergeRequest < ActiveRecord::Migration +class AddMergeWhenBuildSucceedsToMergeRequest < ActiveRecord::Migration[4.2] def change add_column :merge_requests, :merge_params, :text add_column :merge_requests, :merge_when_build_succeeds, :boolean, default: false, null: false diff --git a/db/migrate/20151103001141_add_public_to_group.rb b/db/migrate/20151103001141_add_public_to_group.rb index ba1f7c27832..a5590bc1adc 100644 --- a/db/migrate/20151103001141_add_public_to_group.rb +++ b/db/migrate/20151103001141_add_public_to_group.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPublicToGroup < ActiveRecord::Migration +class AddPublicToGroup < ActiveRecord::Migration[4.2] def change add_column :namespaces, :public, :boolean, default: false end diff --git a/db/migrate/20151103133339_add_shared_runners_setting.rb b/db/migrate/20151103133339_add_shared_runners_setting.rb index b5b34d4ca61..109ee8b25f8 100644 --- a/db/migrate/20151103133339_add_shared_runners_setting.rb +++ b/db/migrate/20151103133339_add_shared_runners_setting.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddSharedRunnersSetting < ActiveRecord::Migration +class AddSharedRunnersSetting < ActiveRecord::Migration[4.2] def up add_column :application_settings, :shared_runners_enabled, :boolean, default: true, null: false end diff --git a/db/migrate/20151103134857_create_lfs_objects.rb b/db/migrate/20151103134857_create_lfs_objects.rb index db6fa27199b..2ba77e431a1 100644 --- a/db/migrate/20151103134857_create_lfs_objects.rb +++ b/db/migrate/20151103134857_create_lfs_objects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateLfsObjects < ActiveRecord::Migration +class CreateLfsObjects < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20151103134958_create_lfs_objects_projects.rb b/db/migrate/20151103134958_create_lfs_objects_projects.rb index 5af1c39fd9c..6f8488463b0 100644 --- a/db/migrate/20151103134958_create_lfs_objects_projects.rb +++ b/db/migrate/20151103134958_create_lfs_objects_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateLfsObjectsProjects < ActiveRecord::Migration +class CreateLfsObjectsProjects < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20151104105513_add_file_to_lfs_objects.rb b/db/migrate/20151104105513_add_file_to_lfs_objects.rb index 4e46ae8101c..a328591cb58 100644 --- a/db/migrate/20151104105513_add_file_to_lfs_objects.rb +++ b/db/migrate/20151104105513_add_file_to_lfs_objects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddFileToLfsObjects < ActiveRecord::Migration +class AddFileToLfsObjects < ActiveRecord::Migration[4.2] def change add_column :lfs_objects, :file, :string end diff --git a/db/migrate/20151105094515_create_releases.rb b/db/migrate/20151105094515_create_releases.rb index 34dd7a10942..4b180a59486 100644 --- a/db/migrate/20151105094515_create_releases.rb +++ b/db/migrate/20151105094515_create_releases.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateReleases < ActiveRecord::Migration +class CreateReleases < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20151106000015_add_is_award_to_notes.rb b/db/migrate/20151106000015_add_is_award_to_notes.rb index b463d939b78..1d866fb3213 100644 --- a/db/migrate/20151106000015_add_is_award_to_notes.rb +++ b/db/migrate/20151106000015_add_is_award_to_notes.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIsAwardToNotes < ActiveRecord::Migration +class AddIsAwardToNotes < ActiveRecord::Migration[4.2] def change add_column :notes, :is_award, :boolean, default: false, null: false add_index :notes, :is_award diff --git a/db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb b/db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb index 25106ace7e9..9af731db644 100644 --- a/db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb +++ b/db/migrate/20151109100728_add_max_artifacts_size_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMaxArtifactsSizeToApplicationSettings < ActiveRecord::Migration +class AddMaxArtifactsSizeToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :max_artifacts_size, :integer, default: 100, null: false end diff --git a/db/migrate/20151109134526_add_issues_state_index.rb b/db/migrate/20151109134526_add_issues_state_index.rb index 7a9970e8591..c77ca90a0d6 100644 --- a/db/migrate/20151109134526_add_issues_state_index.rb +++ b/db/migrate/20151109134526_add_issues_state_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIssuesStateIndex < ActiveRecord::Migration +class AddIssuesStateIndex < ActiveRecord::Migration[4.2] def change add_index :issues, :state end diff --git a/db/migrate/20151109134916_add_projects_visibility_level_index.rb b/db/migrate/20151109134916_add_projects_visibility_level_index.rb index 471db437b11..1e945f0e56f 100644 --- a/db/migrate/20151109134916_add_projects_visibility_level_index.rb +++ b/db/migrate/20151109134916_add_projects_visibility_level_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddProjectsVisibilityLevelIndex < ActiveRecord::Migration +class AddProjectsVisibilityLevelIndex < ActiveRecord::Migration[4.2] def change add_index :projects, :visibility_level end diff --git a/db/migrate/20151110125604_add_import_error_to_project.rb b/db/migrate/20151110125604_add_import_error_to_project.rb index 793358c305e..d6f2acd1584 100644 --- a/db/migrate/20151110125604_add_import_error_to_project.rb +++ b/db/migrate/20151110125604_add_import_error_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddImportErrorToProject < ActiveRecord::Migration +class AddImportErrorToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :import_error, :text end diff --git a/db/migrate/20151114113410_add_index_for_lfs_oid_and_size.rb b/db/migrate/20151114113410_add_index_for_lfs_oid_and_size.rb index 00a4c74ffbc..f2788117cc2 100644 --- a/db/migrate/20151114113410_add_index_for_lfs_oid_and_size.rb +++ b/db/migrate/20151114113410_add_index_for_lfs_oid_and_size.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexForLfsOidAndSize < ActiveRecord::Migration +class AddIndexForLfsOidAndSize < ActiveRecord::Migration[4.2] def change add_index :lfs_objects, :oid add_index :lfs_objects, [:oid, :size] diff --git a/db/migrate/20151116144118_add_unique_for_lfs_oid_index.rb b/db/migrate/20151116144118_add_unique_for_lfs_oid_index.rb index 1f192544ea1..3bfbae67119 100644 --- a/db/migrate/20151116144118_add_unique_for_lfs_oid_index.rb +++ b/db/migrate/20151116144118_add_unique_for_lfs_oid_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddUniqueForLfsOidIndex < ActiveRecord::Migration +class AddUniqueForLfsOidIndex < ActiveRecord::Migration[4.2] def change remove_index :lfs_objects, :oid remove_index :lfs_objects, [:oid, :size] diff --git a/db/migrate/20151118162244_add_projects_public_index.rb b/db/migrate/20151118162244_add_projects_public_index.rb index 589f124c21e..3a525c69ad0 100644 --- a/db/migrate/20151118162244_add_projects_public_index.rb +++ b/db/migrate/20151118162244_add_projects_public_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddProjectsPublicIndex < ActiveRecord::Migration +class AddProjectsPublicIndex < ActiveRecord::Migration[4.2] def change add_index :namespaces, :public end diff --git a/db/migrate/20151201203948_raise_hook_url_limit.rb b/db/migrate/20151201203948_raise_hook_url_limit.rb index c490b7ace0f..4bb4a38e459 100644 --- a/db/migrate/20151201203948_raise_hook_url_limit.rb +++ b/db/migrate/20151201203948_raise_hook_url_limit.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RaiseHookUrlLimit < ActiveRecord::Migration +class RaiseHookUrlLimit < ActiveRecord::Migration[4.2] def change change_column :web_hooks, :url, :string, limit: 2000 end diff --git a/db/migrate/20151203162133_add_hide_project_limit_to_users.rb b/db/migrate/20151203162133_add_hide_project_limit_to_users.rb index 5dc6d8bf445..1b96a0dc550 100644 --- a/db/migrate/20151203162133_add_hide_project_limit_to_users.rb +++ b/db/migrate/20151203162133_add_hide_project_limit_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddHideProjectLimitToUsers < ActiveRecord::Migration +class AddHideProjectLimitToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :hide_project_limit, :boolean, default: false end diff --git a/db/migrate/20151203162134_add_build_events_to_services.rb b/db/migrate/20151203162134_add_build_events_to_services.rb index 455882e5ec0..c49604f8b61 100644 --- a/db/migrate/20151203162134_add_build_events_to_services.rb +++ b/db/migrate/20151203162134_add_build_events_to_services.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddBuildEventsToServices < ActiveRecord::Migration +class AddBuildEventsToServices < ActiveRecord::Migration[4.2] def change add_column :services, :build_events, :boolean, default: false, null: false add_column :web_hooks, :build_events, :boolean, default: false, null: false diff --git a/db/migrate/20151209144329_migrate_ci_web_hooks.rb b/db/migrate/20151209144329_migrate_ci_web_hooks.rb index 62a6d334f04..210b26b6252 100644 --- a/db/migrate/20151209144329_migrate_ci_web_hooks.rb +++ b/db/migrate/20151209144329_migrate_ci_web_hooks.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateCiWebHooks < ActiveRecord::Migration +class MigrateCiWebHooks < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20151209145909_migrate_ci_emails.rb b/db/migrate/20151209145909_migrate_ci_emails.rb index 5de7b205fb1..412094460c0 100644 --- a/db/migrate/20151209145909_migrate_ci_emails.rb +++ b/db/migrate/20151209145909_migrate_ci_emails.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateCiEmails < ActiveRecord::Migration +class MigrateCiEmails < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20151210030143_add_unlock_token_to_user.rb b/db/migrate/20151210030143_add_unlock_token_to_user.rb index d23c648f782..f888bd5f727 100644 --- a/db/migrate/20151210030143_add_unlock_token_to_user.rb +++ b/db/migrate/20151210030143_add_unlock_token_to_user.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddUnlockTokenToUser < ActiveRecord::Migration +class AddUnlockTokenToUser < ActiveRecord::Migration[4.2] def change add_column :users, :unlock_token, :string end diff --git a/db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb b/db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb index 92c7b5befd2..46b893a902d 100644 --- a/db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb +++ b/db/migrate/20151210072243_add_runners_registration_token_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddRunnersRegistrationTokenToApplicationSettings < ActiveRecord::Migration +class AddRunnersRegistrationTokenToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :runners_registration_token, :string end diff --git a/db/migrate/20151210125232_migrate_ci_slack_service.rb b/db/migrate/20151210125232_migrate_ci_slack_service.rb index fff130b7b10..1e472efc231 100644 --- a/db/migrate/20151210125232_migrate_ci_slack_service.rb +++ b/db/migrate/20151210125232_migrate_ci_slack_service.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateCiSlackService < ActiveRecord::Migration +class MigrateCiSlackService < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb b/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb index 824f6f84195..739e9acc488 100644 --- a/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb +++ b/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateCiHipChatService < ActiveRecord::Migration +class MigrateCiHipChatService < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20151210125928_add_ci_to_project.rb b/db/migrate/20151210125928_add_ci_to_project.rb index a9ff49a3f7e..182f1e17b9a 100644 --- a/db/migrate/20151210125928_add_ci_to_project.rb +++ b/db/migrate/20151210125928_add_ci_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCiToProject < ActiveRecord::Migration +class AddCiToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :ci_id, :integer add_column :projects, :builds_enabled, :boolean, default: true, null: false diff --git a/db/migrate/20151210125929_add_project_id_to_ci.rb b/db/migrate/20151210125929_add_project_id_to_ci.rb index b5de64b82ca..3a3dfe01ea6 100644 --- a/db/migrate/20151210125929_add_project_id_to_ci.rb +++ b/db/migrate/20151210125929_add_project_id_to_ci.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddProjectIdToCi < ActiveRecord::Migration +class AddProjectIdToCi < ActiveRecord::Migration[4.2] def change add_column :ci_builds, :gl_project_id, :integer add_column :ci_runner_projects, :gl_project_id, :integer diff --git a/db/migrate/20151210125930_migrate_ci_to_project.rb b/db/migrate/20151210125930_migrate_ci_to_project.rb index bb6d74ae212..a6bca852bd0 100644 --- a/db/migrate/20151210125930_migrate_ci_to_project.rb +++ b/db/migrate/20151210125930_migrate_ci_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class MigrateCiToProject < ActiveRecord::Migration +class MigrateCiToProject < ActiveRecord::Migration[4.2] def up migrate_project_id_for_table('ci_runner_projects') migrate_project_id_for_table('ci_triggers') diff --git a/db/migrate/20151210125931_add_index_to_ci_tables.rb b/db/migrate/20151210125931_add_index_to_ci_tables.rb index d87d335cf6b..2cbc5b50538 100644 --- a/db/migrate/20151210125931_add_index_to_ci_tables.rb +++ b/db/migrate/20151210125931_add_index_to_ci_tables.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexToCiTables < ActiveRecord::Migration +class AddIndexToCiTables < ActiveRecord::Migration[4.2] def change add_index :ci_builds, :gl_project_id add_index :ci_runner_projects, :gl_project_id diff --git a/db/migrate/20151210125932_drop_null_for_ci_tables.rb b/db/migrate/20151210125932_drop_null_for_ci_tables.rb index e1a0a964589..b48fef4b749 100644 --- a/db/migrate/20151210125932_drop_null_for_ci_tables.rb +++ b/db/migrate/20151210125932_drop_null_for_ci_tables.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class DropNullForCiTables < ActiveRecord::Migration +class DropNullForCiTables < ActiveRecord::Migration[4.2] def change remove_index :ci_variables, :project_id remove_index :ci_runner_projects, :project_id diff --git a/db/migrate/20151215132013_add_pages_size_to_application_settings.rb b/db/migrate/20151215132013_add_pages_size_to_application_settings.rb index f3a663f805b..7190d476dc7 100644 --- a/db/migrate/20151215132013_add_pages_size_to_application_settings.rb +++ b/db/migrate/20151215132013_add_pages_size_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddPagesSizeToApplicationSettings < ActiveRecord::Migration +class AddPagesSizeToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20151218154042_add_tfa_to_application_settings.rb b/db/migrate/20151218154042_add_tfa_to_application_settings.rb index afdaf76b917..b4e82554aa8 100644 --- a/db/migrate/20151218154042_add_tfa_to_application_settings.rb +++ b/db/migrate/20151218154042_add_tfa_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTfaToApplicationSettings < ActiveRecord::Migration +class AddTfaToApplicationSettings < ActiveRecord::Migration[4.2] def change change_table :application_settings do |t| t.boolean :require_two_factor_authentication, default: false diff --git a/db/migrate/20151221234414_add_tfa_additional_fields.rb b/db/migrate/20151221234414_add_tfa_additional_fields.rb index c3e4aaa606a..95ec0b2b5ae 100644 --- a/db/migrate/20151221234414_add_tfa_additional_fields.rb +++ b/db/migrate/20151221234414_add_tfa_additional_fields.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTfaAdditionalFields < ActiveRecord::Migration +class AddTfaAdditionalFields < ActiveRecord::Migration[4.2] def change change_table :users do |t| t.datetime :otp_grace_period_started_at, null: true diff --git a/db/migrate/20151224123230_rename_emojis.rb b/db/migrate/20151224123230_rename_emojis.rb index 2c24f3beeea..8be40481ff0 100644 --- a/db/migrate/20151224123230_rename_emojis.rb +++ b/db/migrate/20151224123230_rename_emojis.rb @@ -1,6 +1,6 @@ # rubocop:disable all # Migration type: online without errors (works on previous version and new one) -class RenameEmojis < ActiveRecord::Migration +class RenameEmojis < ActiveRecord::Migration[4.2] def up # Renames aliases to main names execute("UPDATE notes SET note ='thumbsup' WHERE is_award = true AND note = '+1'") diff --git a/db/migrate/20151228111122_remove_public_from_namespace.rb b/db/migrate/20151228111122_remove_public_from_namespace.rb index bcb322d9cba..ad922e3fc58 100644 --- a/db/migrate/20151228111122_remove_public_from_namespace.rb +++ b/db/migrate/20151228111122_remove_public_from_namespace.rb @@ -1,6 +1,6 @@ # rubocop:disable all # Migration type: online -class RemovePublicFromNamespace < ActiveRecord::Migration +class RemovePublicFromNamespace < ActiveRecord::Migration[4.2] def change remove_column :namespaces, :public, :boolean end diff --git a/db/migrate/20151228150906_influxdb_settings.rb b/db/migrate/20151228150906_influxdb_settings.rb index 2e080a02e6a..8266e3c5044 100644 --- a/db/migrate/20151228150906_influxdb_settings.rb +++ b/db/migrate/20151228150906_influxdb_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class InfluxdbSettings < ActiveRecord::Migration +class InfluxdbSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :metrics_enabled, :boolean, default: false diff --git a/db/migrate/20151228175719_add_recaptcha_to_application_settings.rb b/db/migrate/20151228175719_add_recaptcha_to_application_settings.rb index e0dd19b2b06..b68fdcdca11 100644 --- a/db/migrate/20151228175719_add_recaptcha_to_application_settings.rb +++ b/db/migrate/20151228175719_add_recaptcha_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddRecaptchaToApplicationSettings < ActiveRecord::Migration +class AddRecaptchaToApplicationSettings < ActiveRecord::Migration[4.2] def change change_table :application_settings do |t| t.boolean :recaptcha_enabled, default: false diff --git a/db/migrate/20151229102248_influxdb_udp_port_setting.rb b/db/migrate/20151229102248_influxdb_udp_port_setting.rb index 3e1bfd43899..3a65818ab71 100644 --- a/db/migrate/20151229102248_influxdb_udp_port_setting.rb +++ b/db/migrate/20151229102248_influxdb_udp_port_setting.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class InfluxdbUdpPortSetting < ActiveRecord::Migration +class InfluxdbUdpPortSetting < ActiveRecord::Migration[4.2] def change add_column :application_settings, :metrics_port, :integer, default: 8089 end diff --git a/db/migrate/20151229112614_influxdb_remote_database_setting.rb b/db/migrate/20151229112614_influxdb_remote_database_setting.rb index d2ac906ead3..5fdf4c6d4cb 100644 --- a/db/migrate/20151229112614_influxdb_remote_database_setting.rb +++ b/db/migrate/20151229112614_influxdb_remote_database_setting.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class InfluxdbRemoteDatabaseSetting < ActiveRecord::Migration +class InfluxdbRemoteDatabaseSetting < ActiveRecord::Migration[4.2] def change remove_column :application_settings, :metrics_database end diff --git a/db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb b/db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb index 4fcca06d905..e9f230c132c 100644 --- a/db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb +++ b/db/migrate/20151230132518_add_artifacts_metadata_to_ci_build.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddArtifactsMetadataToCiBuild < ActiveRecord::Migration +class AddArtifactsMetadataToCiBuild < ActiveRecord::Migration[4.2] def change add_column :ci_builds, :artifacts_metadata, :text end diff --git a/db/migrate/20151231152326_add_akismet_to_application_settings.rb b/db/migrate/20151231152326_add_akismet_to_application_settings.rb index 7b0fab6f557..f6c697b8cdb 100644 --- a/db/migrate/20151231152326_add_akismet_to_application_settings.rb +++ b/db/migrate/20151231152326_add_akismet_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddAkismetToApplicationSettings < ActiveRecord::Migration +class AddAkismetToApplicationSettings < ActiveRecord::Migration[4.2] def change change_table :application_settings do |t| t.boolean :akismet_enabled, default: false diff --git a/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb b/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb index 0bdd639eb21..2d8b44840f0 100644 --- a/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb +++ b/db/migrate/20151231202530_remove_alert_type_from_broadcast_messages.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveAlertTypeFromBroadcastMessages < ActiveRecord::Migration +class RemoveAlertTypeFromBroadcastMessages < ActiveRecord::Migration[4.2] def change remove_column :broadcast_messages, :alert_type, :integer end diff --git a/db/migrate/20160106162223_add_index_milestones_title.rb b/db/migrate/20160106162223_add_index_milestones_title.rb index 9b9b6445a08..d42bddefe64 100644 --- a/db/migrate/20160106162223_add_index_milestones_title.rb +++ b/db/migrate/20160106162223_add_index_milestones_title.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexMilestonesTitle < ActiveRecord::Migration +class AddIndexMilestonesTitle < ActiveRecord::Migration[4.2] def change add_index :milestones, :title end diff --git a/db/migrate/20160106164438_remove_influxdb_credentials.rb b/db/migrate/20160106164438_remove_influxdb_credentials.rb index 987d75d6fda..569d5a0cf36 100644 --- a/db/migrate/20160106164438_remove_influxdb_credentials.rb +++ b/db/migrate/20160106164438_remove_influxdb_credentials.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveInfluxdbCredentials < ActiveRecord::Migration +class RemoveInfluxdbCredentials < ActiveRecord::Migration[4.2] def change remove_column :application_settings, :metrics_username, :string remove_column :application_settings, :metrics_password, :string diff --git a/db/migrate/20160109054846_create_spam_logs.rb b/db/migrate/20160109054846_create_spam_logs.rb index f7103276639..dc97d03f7ff 100644 --- a/db/migrate/20160109054846_create_spam_logs.rb +++ b/db/migrate/20160109054846_create_spam_logs.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateSpamLogs < ActiveRecord::Migration +class CreateSpamLogs < ActiveRecord::Migration[4.2] def change create_table :spam_logs do |t| t.integer :user_id diff --git a/db/migrate/20160113111034_add_metrics_sample_interval.rb b/db/migrate/20160113111034_add_metrics_sample_interval.rb index c1041da818c..53231e9c6e9 100644 --- a/db/migrate/20160113111034_add_metrics_sample_interval.rb +++ b/db/migrate/20160113111034_add_metrics_sample_interval.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMetricsSampleInterval < ActiveRecord::Migration +class AddMetricsSampleInterval < ActiveRecord::Migration[4.2] def change add_column :application_settings, :metrics_sample_interval, :integer, default: 15 diff --git a/db/migrate/20160118155830_add_sentry_to_application_settings.rb b/db/migrate/20160118155830_add_sentry_to_application_settings.rb index a6f715263ef..a73ed6b762f 100644 --- a/db/migrate/20160118155830_add_sentry_to_application_settings.rb +++ b/db/migrate/20160118155830_add_sentry_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddSentryToApplicationSettings < ActiveRecord::Migration +class AddSentryToApplicationSettings < ActiveRecord::Migration[4.2] def change change_table :application_settings do |t| t.boolean :sentry_enabled, default: false diff --git a/db/migrate/20160118232755_add_ip_blocking_settings_to_application_settings.rb b/db/migrate/20160118232755_add_ip_blocking_settings_to_application_settings.rb index 19ea40b5547..809a6cceef5 100644 --- a/db/migrate/20160118232755_add_ip_blocking_settings_to_application_settings.rb +++ b/db/migrate/20160118232755_add_ip_blocking_settings_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIpBlockingSettingsToApplicationSettings < ActiveRecord::Migration +class AddIpBlockingSettingsToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :ip_blocking_enabled, :boolean, default: false add_column :application_settings, :dnsbl_servers_list, :text diff --git a/db/migrate/20160119111158_add_services_category.rb b/db/migrate/20160119111158_add_services_category.rb index f77484b2f96..979a48584a9 100644 --- a/db/migrate/20160119111158_add_services_category.rb +++ b/db/migrate/20160119111158_add_services_category.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddServicesCategory < ActiveRecord::Migration +class AddServicesCategory < ActiveRecord::Migration[4.2] def up add_column :services, :category, :string, default: 'common', null: false diff --git a/db/migrate/20160119112418_add_services_default.rb b/db/migrate/20160119112418_add_services_default.rb index 7fa531899fe..41ba5d98afe 100644 --- a/db/migrate/20160119112418_add_services_default.rb +++ b/db/migrate/20160119112418_add_services_default.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddServicesDefault < ActiveRecord::Migration +class AddServicesDefault < ActiveRecord::Migration[4.2] def up add_column :services, :default, :boolean, default: false diff --git a/db/migrate/20160119145451_add_ldap_email_to_users.rb b/db/migrate/20160119145451_add_ldap_email_to_users.rb index 5b2b0bd31ca..bf8c27900b8 100644 --- a/db/migrate/20160119145451_add_ldap_email_to_users.rb +++ b/db/migrate/20160119145451_add_ldap_email_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddLdapEmailToUsers < ActiveRecord::Migration +class AddLdapEmailToUsers < ActiveRecord::Migration[4.2] def up add_column :users, :ldap_email, :boolean, default: false, null: false diff --git a/db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb b/db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb index 3837208f81e..2d5100c62ff 100644 --- a/db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb +++ b/db/migrate/20160120172143_add_base_commit_sha_to_merge_request_diffs.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddBaseCommitShaToMergeRequestDiffs < ActiveRecord::Migration +class AddBaseCommitShaToMergeRequestDiffs < ActiveRecord::Migration[4.2] def change add_column :merge_request_diffs, :base_commit_sha, :string end diff --git a/db/migrate/20160121030729_add_email_author_in_body_to_application_settings.rb b/db/migrate/20160121030729_add_email_author_in_body_to_application_settings.rb index 9a2570ae544..0cb1fbe8641 100644 --- a/db/migrate/20160121030729_add_email_author_in_body_to_application_settings.rb +++ b/db/migrate/20160121030729_add_email_author_in_body_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddEmailAuthorInBodyToApplicationSettings < ActiveRecord::Migration +class AddEmailAuthorInBodyToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :email_author_in_body, :boolean, default: false end diff --git a/db/migrate/20160122185421_add_pending_delete_to_project.rb b/db/migrate/20160122185421_add_pending_delete_to_project.rb index 61db852843f..8db0adc9221 100644 --- a/db/migrate/20160122185421_add_pending_delete_to_project.rb +++ b/db/migrate/20160122185421_add_pending_delete_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPendingDeleteToProject < ActiveRecord::Migration +class AddPendingDeleteToProject < ActiveRecord::Migration[4.2] def change add_column :projects, :pending_delete, :boolean, default: false end diff --git a/db/migrate/20160128212447_remove_ip_blocking_settings_from_application_settings.rb b/db/migrate/20160128212447_remove_ip_blocking_settings_from_application_settings.rb index 60ecda998dd..e76f0249ae5 100644 --- a/db/migrate/20160128212447_remove_ip_blocking_settings_from_application_settings.rb +++ b/db/migrate/20160128212447_remove_ip_blocking_settings_from_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveIpBlockingSettingsFromApplicationSettings < ActiveRecord::Migration +class RemoveIpBlockingSettingsFromApplicationSettings < ActiveRecord::Migration[4.2] def change remove_column :application_settings, :ip_blocking_enabled, :boolean, default: false remove_column :application_settings, :dnsbl_servers_list, :text diff --git a/db/migrate/20160128233227_change_lfs_objects_size_column.rb b/db/migrate/20160128233227_change_lfs_objects_size_column.rb index 645c0cdb192..83cd5f38bc8 100644 --- a/db/migrate/20160128233227_change_lfs_objects_size_column.rb +++ b/db/migrate/20160128233227_change_lfs_objects_size_column.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ChangeLfsObjectsSizeColumn < ActiveRecord::Migration +class ChangeLfsObjectsSizeColumn < ActiveRecord::Migration[4.2] def change change_column :lfs_objects, :size, :integer, limit: 8 end diff --git a/db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb b/db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb index b10c0602e24..e1d7996e90a 100644 --- a/db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb +++ b/db/migrate/20160129135155_remove_dot_atom_path_ending_of_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveDotAtomPathEndingOfProjects < ActiveRecord::Migration +class RemoveDotAtomPathEndingOfProjects < ActiveRecord::Migration[4.2] include Gitlab::ShellAdapter class ProjectPath diff --git a/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb b/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb index 332b5a756e8..eeeaa09a092 100644 --- a/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb +++ b/db/migrate/20160129155512_add_merge_commit_sha_to_merge_requests.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMergeCommitShaToMergeRequests < ActiveRecord::Migration +class AddMergeCommitShaToMergeRequests < ActiveRecord::Migration[4.2] def change add_column :merge_requests, :merge_commit_sha, :string end diff --git a/db/migrate/20160202091601_add_erasable_to_ci_build.rb b/db/migrate/20160202091601_add_erasable_to_ci_build.rb index 767ae160d08..214028bd8d3 100644 --- a/db/migrate/20160202091601_add_erasable_to_ci_build.rb +++ b/db/migrate/20160202091601_add_erasable_to_ci_build.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddErasableToCiBuild < ActiveRecord::Migration +class AddErasableToCiBuild < ActiveRecord::Migration[4.2] def change add_reference :ci_builds, :erased_by, references: :users, index: true add_column :ci_builds, :erased_at, :datetime diff --git a/db/migrate/20160202164642_add_allow_guest_to_access_builds_project.rb b/db/migrate/20160202164642_add_allow_guest_to_access_builds_project.rb index 2c5cb307fad..542f9437911 100644 --- a/db/migrate/20160202164642_add_allow_guest_to_access_builds_project.rb +++ b/db/migrate/20160202164642_add_allow_guest_to_access_builds_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddAllowGuestToAccessBuildsProject < ActiveRecord::Migration +class AddAllowGuestToAccessBuildsProject < ActiveRecord::Migration[4.2] def change add_column :projects, :public_builds, :boolean, default: true, null: false end diff --git a/db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb b/db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb index 11b6ff31000..6b8b4c2d372 100644 --- a/db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb +++ b/db/migrate/20160204144558_add_real_size_to_merge_request_diffs.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddRealSizeToMergeRequestDiffs < ActiveRecord::Migration +class AddRealSizeToMergeRequestDiffs < ActiveRecord::Migration[4.2] def change add_column :merge_request_diffs, :real_size, :string end diff --git a/db/migrate/20160209130428_add_index_to_snippet.rb b/db/migrate/20160209130428_add_index_to_snippet.rb index 4d17c3a2917..480ac193d63 100644 --- a/db/migrate/20160209130428_add_index_to_snippet.rb +++ b/db/migrate/20160209130428_add_index_to_snippet.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexToSnippet < ActiveRecord::Migration +class AddIndexToSnippet < ActiveRecord::Migration[4.2] def change add_index :snippets, :updated_at end diff --git a/db/migrate/20160210105555_create_pages_domain.rb b/db/migrate/20160210105555_create_pages_domain.rb index 0e8507c7e9a..a46906d64ca 100644 --- a/db/migrate/20160210105555_create_pages_domain.rb +++ b/db/migrate/20160210105555_create_pages_domain.rb @@ -1,4 +1,4 @@ -class CreatePagesDomain < ActiveRecord::Migration +class CreatePagesDomain < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20160212123307_create_tasks.rb b/db/migrate/20160212123307_create_tasks.rb index cd3ad0e4cd8..33acc8af91f 100644 --- a/db/migrate/20160212123307_create_tasks.rb +++ b/db/migrate/20160212123307_create_tasks.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateTasks < ActiveRecord::Migration +class CreateTasks < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20160217100506_add_description_to_label.rb b/db/migrate/20160217100506_add_description_to_label.rb index af5af167470..c7e4d8c302a 100644 --- a/db/migrate/20160217100506_add_description_to_label.rb +++ b/db/migrate/20160217100506_add_description_to_label.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDescriptionToLabel < ActiveRecord::Migration +class AddDescriptionToLabel < ActiveRecord::Migration[4.2] def change add_column :labels, :description, :string end diff --git a/db/migrate/20160217174422_add_note_to_tasks.rb b/db/migrate/20160217174422_add_note_to_tasks.rb index a9a2b77e423..9bf1924594e 100644 --- a/db/migrate/20160217174422_add_note_to_tasks.rb +++ b/db/migrate/20160217174422_add_note_to_tasks.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNoteToTasks < ActiveRecord::Migration +class AddNoteToTasks < ActiveRecord::Migration[4.2] def change add_reference :tasks, :note, index: true end diff --git a/db/migrate/20160220123949_rename_tasks_to_todos.rb b/db/migrate/20160220123949_rename_tasks_to_todos.rb index f16b37537f3..e9edd78facb 100644 --- a/db/migrate/20160220123949_rename_tasks_to_todos.rb +++ b/db/migrate/20160220123949_rename_tasks_to_todos.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RenameTasksToTodos < ActiveRecord::Migration +class RenameTasksToTodos < ActiveRecord::Migration[4.2] def change rename_table :tasks, :todos end diff --git a/db/migrate/20160222153918_create_appearances_ce.rb b/db/migrate/20160222153918_create_appearances_ce.rb index b2d5949b23f..37bbe62ad3d 100644 --- a/db/migrate/20160222153918_create_appearances_ce.rb +++ b/db/migrate/20160222153918_create_appearances_ce.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateAppearancesCe < ActiveRecord::Migration +class CreateAppearancesCe < ActiveRecord::Migration[4.2] def change unless table_exists?(:appearances) create_table :appearances do |t| diff --git a/db/migrate/20160223192159_add_confidential_to_issues.rb b/db/migrate/20160223192159_add_confidential_to_issues.rb index 5b99ce30e9f..ca029f12337 100644 --- a/db/migrate/20160223192159_add_confidential_to_issues.rb +++ b/db/migrate/20160223192159_add_confidential_to_issues.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddConfidentialToIssues < ActiveRecord::Migration +class AddConfidentialToIssues < ActiveRecord::Migration[4.2] def change add_column :issues, :confidential, :boolean, default: false add_index :issues, :confidential diff --git a/db/migrate/20160225090018_add_delete_at_to_issues.rb b/db/migrate/20160225090018_add_delete_at_to_issues.rb index 139f911e1c9..3ae74f491f6 100644 --- a/db/migrate/20160225090018_add_delete_at_to_issues.rb +++ b/db/migrate/20160225090018_add_delete_at_to_issues.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDeleteAtToIssues < ActiveRecord::Migration +class AddDeleteAtToIssues < ActiveRecord::Migration[4.2] def change add_column :issues, :deleted_at, :datetime add_index :issues, :deleted_at diff --git a/db/migrate/20160225101956_add_delete_at_to_merge_requests.rb b/db/migrate/20160225101956_add_delete_at_to_merge_requests.rb index 4ca3f0dcdc5..ce8657ba88c 100644 --- a/db/migrate/20160225101956_add_delete_at_to_merge_requests.rb +++ b/db/migrate/20160225101956_add_delete_at_to_merge_requests.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDeleteAtToMergeRequests < ActiveRecord::Migration +class AddDeleteAtToMergeRequests < ActiveRecord::Migration[4.2] def change add_column :merge_requests, :deleted_at, :datetime add_index :merge_requests, :deleted_at diff --git a/db/migrate/20160226114608_add_trigram_indexes_for_searching.rb b/db/migrate/20160226114608_add_trigram_indexes_for_searching.rb index 6f5637e5b59..d6c76c89d81 100644 --- a/db/migrate/20160226114608_add_trigram_indexes_for_searching.rb +++ b/db/migrate/20160226114608_add_trigram_indexes_for_searching.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTrigramIndexesForSearching < ActiveRecord::Migration +class AddTrigramIndexesForSearching < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up diff --git a/db/migrate/20160227120001_add_event_field_for_web_hook.rb b/db/migrate/20160227120001_add_event_field_for_web_hook.rb index 89910893ee1..22bbd73114f 100644 --- a/db/migrate/20160227120001_add_event_field_for_web_hook.rb +++ b/db/migrate/20160227120001_add_event_field_for_web_hook.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddEventFieldForWebHook < ActiveRecord::Migration +class AddEventFieldForWebHook < ActiveRecord::Migration[4.2] def change add_column :web_hooks, :wiki_page_events, :boolean, default: false, null: false end diff --git a/db/migrate/20160227120047_add_event_to_services.rb b/db/migrate/20160227120047_add_event_to_services.rb index fe7c54ca4eb..a3b94734ec2 100644 --- a/db/migrate/20160227120047_add_event_to_services.rb +++ b/db/migrate/20160227120047_add_event_to_services.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddEventToServices < ActiveRecord::Migration +class AddEventToServices < ActiveRecord::Migration[4.2] def change add_column :services, :wiki_page_events, :boolean, default: true end diff --git a/db/migrate/20160229193553_add_main_language_to_repository.rb b/db/migrate/20160229193553_add_main_language_to_repository.rb index ad5167b4c93..7893c1e74cf 100644 --- a/db/migrate/20160229193553_add_main_language_to_repository.rb +++ b/db/migrate/20160229193553_add_main_language_to_repository.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMainLanguageToRepository < ActiveRecord::Migration +class AddMainLanguageToRepository < ActiveRecord::Migration[4.2] def change add_column :projects, :main_language, :string end diff --git a/db/migrate/20160301124843_add_visibility_level_to_groups.rb b/db/migrate/20160301124843_add_visibility_level_to_groups.rb index a874e6758dd..ed4bca4f1ba 100644 --- a/db/migrate/20160301124843_add_visibility_level_to_groups.rb +++ b/db/migrate/20160301124843_add_visibility_level_to_groups.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddVisibilityLevelToGroups < ActiveRecord::Migration +class AddVisibilityLevelToGroups < ActiveRecord::Migration[4.2] def up add_column :namespaces, :visibility_level, :integer, null: false, default: Gitlab::VisibilityLevel::PUBLIC add_index :namespaces, :visibility_level diff --git a/db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb b/db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb index 1f400566f9f..61fee690ac0 100644 --- a/db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb +++ b/db/migrate/20160302151724_add_import_credentials_to_project_import_data.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddImportCredentialsToProjectImportData < ActiveRecord::Migration +class AddImportCredentialsToProjectImportData < ActiveRecord::Migration[4.2] def change add_column :project_import_data, :encrypted_credentials, :text add_column :project_import_data, :encrypted_credentials_iv, :string diff --git a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb index 611767ac7fe..6e5c43e0786 100644 --- a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb +++ b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb @@ -2,7 +2,7 @@ # Loops through old importer projects that kept a token/password in the import URL # and encrypts the credentials into a separate field in project#import_data # #down method not supported -class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration +class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration[4.2] class ProjectImportDataFake extend AttrEncrypted diff --git a/db/migrate/20160305220806_remove_expires_at_from_snippets.rb b/db/migrate/20160305220806_remove_expires_at_from_snippets.rb index cac78703bc2..6835f534926 100644 --- a/db/migrate/20160305220806_remove_expires_at_from_snippets.rb +++ b/db/migrate/20160305220806_remove_expires_at_from_snippets.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveExpiresAtFromSnippets < ActiveRecord::Migration +class RemoveExpiresAtFromSnippets < ActiveRecord::Migration[4.2] def change remove_column :snippets, :expires_at, :datetime end diff --git a/db/migrate/20160307221555_disallow_blank_line_code_on_note.rb b/db/migrate/20160307221555_disallow_blank_line_code_on_note.rb index 10f2b8cc56a..9aad5f7f281 100644 --- a/db/migrate/20160307221555_disallow_blank_line_code_on_note.rb +++ b/db/migrate/20160307221555_disallow_blank_line_code_on_note.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class DisallowBlankLineCodeOnNote < ActiveRecord::Migration +class DisallowBlankLineCodeOnNote < ActiveRecord::Migration[4.2] def up execute("UPDATE notes SET line_code = NULL WHERE line_code = ''") end diff --git a/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb b/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb index 92c0a1e088e..16053408fe0 100644 --- a/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb +++ b/db/migrate/20160308212903_add_default_group_visibility_to_application_settings.rb @@ -3,7 +3,7 @@ # Sets default_visibility_level to value on settings if not restricted # If value is restricted takes higher visibility level allowed -class AddDefaultGroupVisibilityToApplicationSettings < ActiveRecord::Migration +class AddDefaultGroupVisibilityToApplicationSettings < ActiveRecord::Migration[4.2] def up add_column :application_settings, :default_group_visibility, :integer # Unfortunately, this can't be a `default`, since we don't want the configuration specific diff --git a/db/migrate/20160309140734_fix_todos.rb b/db/migrate/20160309140734_fix_todos.rb index 94fe1e4fdc3..917055f5036 100644 --- a/db/migrate/20160309140734_fix_todos.rb +++ b/db/migrate/20160309140734_fix_todos.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class FixTodos < ActiveRecord::Migration +class FixTodos < ActiveRecord::Migration[4.2] def up execute <<-SQL DELETE FROM todos diff --git a/db/migrate/20160310124959_add_due_date_to_issues.rb b/db/migrate/20160310124959_add_due_date_to_issues.rb index a4eb6aaee63..8da38ea60b1 100644 --- a/db/migrate/20160310124959_add_due_date_to_issues.rb +++ b/db/migrate/20160310124959_add_due_date_to_issues.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDueDateToIssues < ActiveRecord::Migration +class AddDueDateToIssues < ActiveRecord::Migration[4.2] def change add_column :issues, :due_date, :date add_index :issues, :due_date diff --git a/db/migrate/20160310185910_add_external_flag_to_users.rb b/db/migrate/20160310185910_add_external_flag_to_users.rb index 209496dc786..768bbe4cd42 100644 --- a/db/migrate/20160310185910_add_external_flag_to_users.rb +++ b/db/migrate/20160310185910_add_external_flag_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddExternalFlagToUsers < ActiveRecord::Migration +class AddExternalFlagToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :external, :boolean, default: false end diff --git a/db/migrate/20160314094147_add_priority_to_label.rb b/db/migrate/20160314094147_add_priority_to_label.rb index 7fb23cba4c9..8e2aaf50109 100644 --- a/db/migrate/20160314094147_add_priority_to_label.rb +++ b/db/migrate/20160314094147_add_priority_to_label.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddPriorityToLabel < ActiveRecord::Migration +class AddPriorityToLabel < ActiveRecord::Migration[4.2] def change add_column :labels, :priority, :integer add_index :labels, :priority diff --git a/db/migrate/20160314114439_add_requested_at_to_members.rb b/db/migrate/20160314114439_add_requested_at_to_members.rb index 76c8b8a1a24..e7e03f96ef8 100644 --- a/db/migrate/20160314114439_add_requested_at_to_members.rb +++ b/db/migrate/20160314114439_add_requested_at_to_members.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Datetime -class AddRequestedAtToMembers < ActiveRecord::Migration +class AddRequestedAtToMembers < ActiveRecord::Migration[4.2] def change add_column :members, :requested_at, :datetime end diff --git a/db/migrate/20160314143402_projects_add_pushes_since_gc.rb b/db/migrate/20160314143402_projects_add_pushes_since_gc.rb index 9f8ffe073a3..e64093d39cf 100644 --- a/db/migrate/20160314143402_projects_add_pushes_since_gc.rb +++ b/db/migrate/20160314143402_projects_add_pushes_since_gc.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ProjectsAddPushesSinceGc < ActiveRecord::Migration +class ProjectsAddPushesSinceGc < ActiveRecord::Migration[4.2] def change add_column :projects, :pushes_since_gc, :integer, default: 0 end diff --git a/db/migrate/20160315135439_project_add_repository_check.rb b/db/migrate/20160315135439_project_add_repository_check.rb index 8fe649246c7..c03d8bb041c 100644 --- a/db/migrate/20160315135439_project_add_repository_check.rb +++ b/db/migrate/20160315135439_project_add_repository_check.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ProjectAddRepositoryCheck < ActiveRecord::Migration +class ProjectAddRepositoryCheck < ActiveRecord::Migration[4.2] def change add_column :projects, :last_repository_check_failed, :boolean add_index :projects, :last_repository_check_failed diff --git a/db/migrate/20160316123110_ci_runners_token_index.rb b/db/migrate/20160316123110_ci_runners_token_index.rb index ff3d36d68ee..026846e6464 100644 --- a/db/migrate/20160316123110_ci_runners_token_index.rb +++ b/db/migrate/20160316123110_ci_runners_token_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CiRunnersTokenIndex < ActiveRecord::Migration +class CiRunnersTokenIndex < ActiveRecord::Migration[4.2] disable_ddl_transaction! def change diff --git a/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb b/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb index 65e0e61c78f..691a3869ee2 100644 --- a/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb +++ b/db/migrate/20160316192622_change_target_id_to_null_on_todos.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ChangeTargetIdToNullOnTodos < ActiveRecord::Migration +class ChangeTargetIdToNullOnTodos < ActiveRecord::Migration[4.2] def change change_column_null :todos, :target_id, true end diff --git a/db/migrate/20160316204731_add_commit_id_to_todos.rb b/db/migrate/20160316204731_add_commit_id_to_todos.rb index d79858fc920..d1c004b2ced 100644 --- a/db/migrate/20160316204731_add_commit_id_to_todos.rb +++ b/db/migrate/20160316204731_add_commit_id_to_todos.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCommitIdToTodos < ActiveRecord::Migration +class AddCommitIdToTodos < ActiveRecord::Migration[4.2] def change add_column :todos, :commit_id, :string add_index :todos, :commit_id diff --git a/db/migrate/20160317092222_add_moved_to_to_issue.rb b/db/migrate/20160317092222_add_moved_to_to_issue.rb index 9dde668ddff..fc47ec1c18f 100644 --- a/db/migrate/20160317092222_add_moved_to_to_issue.rb +++ b/db/migrate/20160317092222_add_moved_to_to_issue.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMovedToToIssue < ActiveRecord::Migration +class AddMovedToToIssue < ActiveRecord::Migration[4.2] def change add_reference :issues, :moved_to, references: :issues end diff --git a/db/migrate/20160320204112_index_namespaces_on_visibility_level.rb b/db/migrate/20160320204112_index_namespaces_on_visibility_level.rb index 07ae7c95477..9692def430c 100644 --- a/db/migrate/20160320204112_index_namespaces_on_visibility_level.rb +++ b/db/migrate/20160320204112_index_namespaces_on_visibility_level.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class IndexNamespacesOnVisibilityLevel < ActiveRecord::Migration +class IndexNamespacesOnVisibilityLevel < ActiveRecord::Migration[4.2] def change unless index_exists?(:namespaces, :visibility_level) add_index :namespaces, :visibility_level diff --git a/db/migrate/20160324020319_remove_todos_for_deleted_issues.rb b/db/migrate/20160324020319_remove_todos_for_deleted_issues.rb index a9a851cfe63..73bcf700b33 100644 --- a/db/migrate/20160324020319_remove_todos_for_deleted_issues.rb +++ b/db/migrate/20160324020319_remove_todos_for_deleted_issues.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveTodosForDeletedIssues < ActiveRecord::Migration +class RemoveTodosForDeletedIssues < ActiveRecord::Migration[4.2] def up execute <<-SQL DELETE FROM todos diff --git a/db/migrate/20160328112808_create_notification_settings.rb b/db/migrate/20160328112808_create_notification_settings.rb index 7d77e8004ba..db19d2e370c 100644 --- a/db/migrate/20160328112808_create_notification_settings.rb +++ b/db/migrate/20160328112808_create_notification_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateNotificationSettings < ActiveRecord::Migration +class CreateNotificationSettings < ActiveRecord::Migration[4.2] def change create_table :notification_settings do |t| t.references :user, null: false diff --git a/db/migrate/20160328115649_migrate_new_notification_setting.rb b/db/migrate/20160328115649_migrate_new_notification_setting.rb index eb6b7d07219..66d08cc170e 100644 --- a/db/migrate/20160328115649_migrate_new_notification_setting.rb +++ b/db/migrate/20160328115649_migrate_new_notification_setting.rb @@ -6,7 +6,7 @@ # - during migration some users will receive notifications based on their global settings (project/group settings will be ignored) # - its possible to get duplicate records for notification settings since we don't create uniq index yet # -class MigrateNewNotificationSetting < ActiveRecord::Migration +class MigrateNewNotificationSetting < ActiveRecord::Migration[4.2] def up timestamp = Time.now.strftime('%F %T') execute "INSERT INTO notification_settings ( user_id, source_id, source_type, level, created_at, updated_at ) SELECT user_id, source_id, source_type, notification_level, '#{timestamp}', '#{timestamp}' FROM members WHERE user_id IS NOT NULL" diff --git a/db/migrate/20160328121138_add_notification_setting_index.rb b/db/migrate/20160328121138_add_notification_setting_index.rb index 667270d6b04..ed82b172296 100644 --- a/db/migrate/20160328121138_add_notification_setting_index.rb +++ b/db/migrate/20160328121138_add_notification_setting_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddNotificationSettingIndex < ActiveRecord::Migration +class AddNotificationSettingIndex < ActiveRecord::Migration[4.2] def change add_index :notification_settings, :user_id add_index :notification_settings, [:source_id, :source_type] diff --git a/db/migrate/20160329144452_add_index_on_pending_delete_projects.rb b/db/migrate/20160329144452_add_index_on_pending_delete_projects.rb index a3df8fb4e2e..15c44f74451 100644 --- a/db/migrate/20160329144452_add_index_on_pending_delete_projects.rb +++ b/db/migrate/20160329144452_add_index_on_pending_delete_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexOnPendingDeleteProjects < ActiveRecord::Migration +class AddIndexOnPendingDeleteProjects < ActiveRecord::Migration[4.2] def change add_index :projects, :pending_delete end diff --git a/db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb b/db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb index b15af79b9b5..0480211c38c 100644 --- a/db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb +++ b/db/migrate/20160331133914_remove_todos_for_deleted_merge_requests.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveTodosForDeletedMergeRequests < ActiveRecord::Migration +class RemoveTodosForDeletedMergeRequests < ActiveRecord::Migration[4.2] def up execute <<-SQL DELETE FROM todos diff --git a/db/migrate/20160331223143_remove_twitter_sharing_enabled_from_application_settings.rb b/db/migrate/20160331223143_remove_twitter_sharing_enabled_from_application_settings.rb index dec80497fb3..6e5a748d096 100644 --- a/db/migrate/20160331223143_remove_twitter_sharing_enabled_from_application_settings.rb +++ b/db/migrate/20160331223143_remove_twitter_sharing_enabled_from_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveTwitterSharingEnabledFromApplicationSettings < ActiveRecord::Migration +class RemoveTwitterSharingEnabledFromApplicationSettings < ActiveRecord::Migration[4.2] def change remove_column :application_settings, :twitter_sharing_enabled, :boolean end diff --git a/db/migrate/20160407120251_add_images_enabled_for_project.rb b/db/migrate/20160407120251_add_images_enabled_for_project.rb index fcffc98b47a..e517b3b6053 100644 --- a/db/migrate/20160407120251_add_images_enabled_for_project.rb +++ b/db/migrate/20160407120251_add_images_enabled_for_project.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddImagesEnabledForProject < ActiveRecord::Migration +class AddImagesEnabledForProject < ActiveRecord::Migration[4.2] def change add_column :projects, :container_registry_enabled, :boolean end diff --git a/db/migrate/20160412140240_add_repository_checks_enabled_setting.rb b/db/migrate/20160412140240_add_repository_checks_enabled_setting.rb index 920d4d41110..a59563b835e 100644 --- a/db/migrate/20160412140240_add_repository_checks_enabled_setting.rb +++ b/db/migrate/20160412140240_add_repository_checks_enabled_setting.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddRepositoryChecksEnabledSetting < ActiveRecord::Migration +class AddRepositoryChecksEnabledSetting < ActiveRecord::Migration[4.2] def change add_column :application_settings, :repository_checks_enabled, :boolean, default: true end diff --git a/db/migrate/20160412173416_add_fields_to_ci_commit.rb b/db/migrate/20160412173416_add_fields_to_ci_commit.rb index 00162af5cda..4b3d4e8bd30 100644 --- a/db/migrate/20160412173416_add_fields_to_ci_commit.rb +++ b/db/migrate/20160412173416_add_fields_to_ci_commit.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddFieldsToCiCommit < ActiveRecord::Migration +class AddFieldsToCiCommit < ActiveRecord::Migration[4.2] def change add_column :ci_commits, :status, :string add_column :ci_commits, :started_at, :timestamp diff --git a/db/migrate/20160412173417_update_ci_commit.rb b/db/migrate/20160412173417_update_ci_commit.rb index 858faeb060e..91dd4582f7a 100644 --- a/db/migrate/20160412173417_update_ci_commit.rb +++ b/db/migrate/20160412173417_update_ci_commit.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class UpdateCiCommit < ActiveRecord::Migration +class UpdateCiCommit < ActiveRecord::Migration[4.2] # This migration can be run online, but needs to be executed for the second time after restarting Unicorn workers # Otherwise Offline migration should be used. def change diff --git a/db/migrate/20160412173418_add_ci_commit_indexes.rb b/db/migrate/20160412173418_add_ci_commit_indexes.rb index 414f1f8279f..709e6b84d57 100644 --- a/db/migrate/20160412173418_add_ci_commit_indexes.rb +++ b/db/migrate/20160412173418_add_ci_commit_indexes.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddCiCommitIndexes < ActiveRecord::Migration +class AddCiCommitIndexes < ActiveRecord::Migration[4.2] disable_ddl_transaction! def change diff --git a/db/migrate/20160413115152_add_token_to_web_hooks.rb b/db/migrate/20160413115152_add_token_to_web_hooks.rb index 628b1d51b30..a405cd9d62c 100644 --- a/db/migrate/20160413115152_add_token_to_web_hooks.rb +++ b/db/migrate/20160413115152_add_token_to_web_hooks.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTokenToWebHooks < ActiveRecord::Migration +class AddTokenToWebHooks < ActiveRecord::Migration[4.2] def change add_column :web_hooks, :token, :string end diff --git a/db/migrate/20160415062917_create_personal_access_tokens.rb b/db/migrate/20160415062917_create_personal_access_tokens.rb index c7b49870bf7..7ef7802d23d 100644 --- a/db/migrate/20160415062917_create_personal_access_tokens.rb +++ b/db/migrate/20160415062917_create_personal_access_tokens.rb @@ -1,6 +1,6 @@ # rubocop:disable Migration/Datetime # rubocop:disable Migration/Timestamps -class CreatePersonalAccessTokens < ActiveRecord::Migration +class CreatePersonalAccessTokens < ActiveRecord::Migration[4.2] def change create_table :personal_access_tokens do |t| t.references :user, index: true, foreign_key: true, null: false diff --git a/db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb b/db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb index b53b9bc6c3d..a414e8b2c45 100644 --- a/db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb +++ b/db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddSharedRunnersTextToApplicationSettings < ActiveRecord::Migration +class AddSharedRunnersTextToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :shared_runners_text, :text end diff --git a/db/migrate/20160416180807_add_award_emoji.rb b/db/migrate/20160416180807_add_award_emoji.rb index 0d252e5044e..99c984fd116 100644 --- a/db/migrate/20160416180807_add_award_emoji.rb +++ b/db/migrate/20160416180807_add_award_emoji.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddAwardEmoji < ActiveRecord::Migration +class AddAwardEmoji < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb b/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb index 95ee03611d9..80c51d516d6 100644 --- a/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb +++ b/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class ConvertAwardNoteToEmojiAward < ActiveRecord::Migration +class ConvertAwardNoteToEmojiAward < ActiveRecord::Migration[4.2] disable_ddl_transaction! def up diff --git a/db/migrate/20160419120017_add_metrics_packet_size.rb b/db/migrate/20160419120017_add_metrics_packet_size.rb index c759427c590..9698f1cac24 100644 --- a/db/migrate/20160419120017_add_metrics_packet_size.rb +++ b/db/migrate/20160419120017_add_metrics_packet_size.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddMetricsPacketSize < ActiveRecord::Migration +class AddMetricsPacketSize < ActiveRecord::Migration[4.2] def change add_column :application_settings, :metrics_packet_size, :integer, default: 1 end diff --git a/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb b/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb index 22bac46e25c..e0908479962 100644 --- a/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb +++ b/db/migrate/20160419122101_add_only_allow_merge_if_build_succeeds_to_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class AddOnlyAllowMergeIfBuildSucceedsToProjects < ActiveRecord::Migration +class AddOnlyAllowMergeIfBuildSucceedsToProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160421130527_disable_repository_checks.rb b/db/migrate/20160421130527_disable_repository_checks.rb index 7e65ddc45e7..40057e8f971 100644 --- a/db/migrate/20160421130527_disable_repository_checks.rb +++ b/db/migrate/20160421130527_disable_repository_checks.rb @@ -1,12 +1,12 @@ # rubocop:disable all -class DisableRepositoryChecks < ActiveRecord::Migration +class DisableRepositoryChecks < ActiveRecord::Migration[4.2] def up - change_column_default :application_settings, :repository_checks_enabled, false + change_column_default :application_settings, :repository_checks_enabled, false execute 'UPDATE application_settings SET repository_checks_enabled = false' end def down - change_column_default :application_settings, :repository_checks_enabled, true + change_column_default :application_settings, :repository_checks_enabled, true execute 'UPDATE application_settings SET repository_checks_enabled = true' end end diff --git a/db/migrate/20160425045124_create_u2f_registrations.rb b/db/migrate/20160425045124_create_u2f_registrations.rb index 72cbe98ebba..9b48fc822b6 100644 --- a/db/migrate/20160425045124_create_u2f_registrations.rb +++ b/db/migrate/20160425045124_create_u2f_registrations.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateU2fRegistrations < ActiveRecord::Migration +class CreateU2fRegistrations < ActiveRecord::Migration[4.2] def change create_table :u2f_registrations do |t| t.text :certificate diff --git a/db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb b/db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb index bf50616656c..efc3db67cd1 100644 --- a/db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb +++ b/db/migrate/20160504091942_add_disabled_oauth_sign_in_sources_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddDisabledOauthSignInSourcesToApplicationSettings < ActiveRecord::Migration +class AddDisabledOauthSignInSourcesToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :disabled_oauth_sign_in_sources, :text end diff --git a/db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb b/db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb index c60892a6279..6b065dfdb7b 100644 --- a/db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb +++ b/db/migrate/20160504112519_add_run_untagged_to_ci_runner.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddRunUntaggedToCiRunner < ActiveRecord::Migration +class AddRunUntaggedToCiRunner < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160508194200_remove_wall_enabled_from_projects.rb b/db/migrate/20160508194200_remove_wall_enabled_from_projects.rb index 6792ffc957a..4edbeb09f74 100644 --- a/db/migrate/20160508194200_remove_wall_enabled_from_projects.rb +++ b/db/migrate/20160508194200_remove_wall_enabled_from_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveWallEnabledFromProjects < ActiveRecord::Migration +class RemoveWallEnabledFromProjects < ActiveRecord::Migration[4.2] def change remove_column :projects, :wall_enabled, :boolean, default: true, null: false end diff --git a/db/migrate/20160508202603_add_head_commit_id_to_merge_request_diffs.rb b/db/migrate/20160508202603_add_head_commit_id_to_merge_request_diffs.rb index 1c4d60e7234..ee7c9326bfe 100644 --- a/db/migrate/20160508202603_add_head_commit_id_to_merge_request_diffs.rb +++ b/db/migrate/20160508202603_add_head_commit_id_to_merge_request_diffs.rb @@ -1,4 +1,4 @@ -class AddHeadCommitIdToMergeRequestDiffs < ActiveRecord::Migration +class AddHeadCommitIdToMergeRequestDiffs < ActiveRecord::Migration[4.2] def change add_column :merge_request_diffs, :head_commit_sha, :string end diff --git a/db/migrate/20160508215820_add_type_to_notes.rb b/db/migrate/20160508215820_add_type_to_notes.rb index c1d07c9363f..2da7dfa361a 100644 --- a/db/migrate/20160508215820_add_type_to_notes.rb +++ b/db/migrate/20160508215820_add_type_to_notes.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddTypeToNotes < ActiveRecord::Migration +class AddTypeToNotes < ActiveRecord::Migration[4.2] def change add_column :notes, :type, :string end diff --git a/db/migrate/20160508215920_add_positions_to_diff_notes.rb b/db/migrate/20160508215920_add_positions_to_diff_notes.rb index 2952c25004e..e0ee03d0fb5 100644 --- a/db/migrate/20160508215920_add_positions_to_diff_notes.rb +++ b/db/migrate/20160508215920_add_positions_to_diff_notes.rb @@ -1,4 +1,4 @@ -class AddPositionsToDiffNotes < ActiveRecord::Migration +class AddPositionsToDiffNotes < ActiveRecord::Migration[4.2] def change add_column :notes, :position, :text add_column :notes, :original_position, :text diff --git a/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb b/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb index 6dd958ff4a0..567754d4f4e 100644 --- a/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb +++ b/db/migrate/20160508221410_set_type_on_legacy_diff_notes.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class SetTypeOnLegacyDiffNotes < ActiveRecord::Migration +class SetTypeOnLegacyDiffNotes < ActiveRecord::Migration[4.2] def change execute "UPDATE notes SET type = 'LegacyDiffNote' WHERE line_code IS NOT NULL" end diff --git a/db/migrate/20160509091049_add_locked_to_ci_runner.rb b/db/migrate/20160509091049_add_locked_to_ci_runner.rb index 3fbaef3b7f0..e19db5a4504 100644 --- a/db/migrate/20160509091049_add_locked_to_ci_runner.rb +++ b/db/migrate/20160509091049_add_locked_to_ci_runner.rb @@ -1,4 +1,4 @@ -class AddLockedToCiRunner < ActiveRecord::Migration +class AddLockedToCiRunner < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb b/db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb index b6a5bea79b6..356c973221b 100644 --- a/db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb +++ b/db/migrate/20160509201028_add_health_check_access_token_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddHealthCheckAccessTokenToApplicationSettings < ActiveRecord::Migration +class AddHealthCheckAccessTokenToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :health_check_access_token, :string end diff --git a/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb b/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb index 8c96353b850..9e203b97a43 100644 --- a/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb +++ b/db/migrate/20160516174813_add_send_user_confirmation_email_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddSendUserConfirmationEmailToApplicationSettings < ActiveRecord::Migration +class AddSendUserConfirmationEmailToApplicationSettings < ActiveRecord::Migration[4.2] def up add_column :application_settings, :send_user_confirmation_email, :boolean, default: false diff --git a/db/migrate/20160516224534_add_start_commit_id_to_merge_request_diffs.rb b/db/migrate/20160516224534_add_start_commit_id_to_merge_request_diffs.rb index b7fd76ee84b..a84bfd64bda 100644 --- a/db/migrate/20160516224534_add_start_commit_id_to_merge_request_diffs.rb +++ b/db/migrate/20160516224534_add_start_commit_id_to_merge_request_diffs.rb @@ -1,4 +1,4 @@ -class AddStartCommitIdToMergeRequestDiffs < ActiveRecord::Migration +class AddStartCommitIdToMergeRequestDiffs < ActiveRecord::Migration[4.2] def change add_column :merge_request_diffs, :start_commit_sha, :string end diff --git a/db/migrate/20160518200441_add_artifacts_expire_date_to_ci_builds.rb b/db/migrate/20160518200441_add_artifacts_expire_date_to_ci_builds.rb index 915167b038d..2c1e6afc546 100644 --- a/db/migrate/20160518200441_add_artifacts_expire_date_to_ci_builds.rb +++ b/db/migrate/20160518200441_add_artifacts_expire_date_to_ci_builds.rb @@ -1,4 +1,4 @@ -class AddArtifactsExpireDateToCiBuilds < ActiveRecord::Migration +class AddArtifactsExpireDateToCiBuilds < ActiveRecord::Migration[4.2] def change add_column :ci_builds, :artifacts_expire_at, :timestamp end diff --git a/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb b/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb index ac50035eba4..ba0e1654379 100644 --- a/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb +++ b/db/migrate/20160519203051_add_developers_can_merge_to_protected_branches.rb @@ -1,4 +1,4 @@ -class AddDevelopersCanMergeToProtectedBranches < ActiveRecord::Migration +class AddDevelopersCanMergeToProtectedBranches < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160522215720_add_note_type_and_position_to_sent_notification.rb b/db/migrate/20160522215720_add_note_type_and_position_to_sent_notification.rb index 4eef16c9408..f569fc7c73f 100644 --- a/db/migrate/20160522215720_add_note_type_and_position_to_sent_notification.rb +++ b/db/migrate/20160522215720_add_note_type_and_position_to_sent_notification.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddNoteTypeAndPositionToSentNotification < ActiveRecord::Migration +class AddNoteTypeAndPositionToSentNotification < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # When using the methods "add_concurrent_index" or "add_column_with_default" diff --git a/db/migrate/20160525205328_remove_main_language_from_projects.rb b/db/migrate/20160525205328_remove_main_language_from_projects.rb index dc4ceacddb1..81d0fb5b080 100644 --- a/db/migrate/20160525205328_remove_main_language_from_projects.rb +++ b/db/migrate/20160525205328_remove_main_language_from_projects.rb @@ -2,7 +2,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveMainLanguageFromProjects < ActiveRecord::Migration +class RemoveMainLanguageFromProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # When using the methods "add_concurrent_index" or "add_column_with_default" diff --git a/db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb b/db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb index 3e26be7c09c..365991933fa 100644 --- a/db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb +++ b/db/migrate/20160527020117_remove_notification_settings_for_deleted_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveNotificationSettingsForDeletedProjects < ActiveRecord::Migration +class RemoveNotificationSettingsForDeletedProjects < ActiveRecord::Migration[4.2] def up execute <<-SQL DELETE FROM notification_settings diff --git a/db/migrate/20160528043124_add_users_state_index.rb b/db/migrate/20160528043124_add_users_state_index.rb index 6419d2ae71d..3437b35a0c0 100644 --- a/db/migrate/20160528043124_add_users_state_index.rb +++ b/db/migrate/20160528043124_add_users_state_index.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddUsersStateIndex < ActiveRecord::Migration +class AddUsersStateIndex < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb b/db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb index d811fd5271e..1cca7ce869e 100644 --- a/db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb +++ b/db/migrate/20160530150109_add_container_registry_token_expire_delay_to_application_settings.rb @@ -1,7 +1,7 @@ # rubocop:disable all # This is ONLINE migration -class AddContainerRegistryTokenExpireDelayToApplicationSettings < ActiveRecord::Migration +class AddContainerRegistryTokenExpireDelayToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160603075128_add_has_external_issue_tracker_to_projects.rb b/db/migrate/20160603075128_add_has_external_issue_tracker_to_projects.rb index be295f0181d..a7d2d7f9952 100644 --- a/db/migrate/20160603075128_add_has_external_issue_tracker_to_projects.rb +++ b/db/migrate/20160603075128_add_has_external_issue_tracker_to_projects.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddHasExternalIssueTrackerToProjects < ActiveRecord::Migration +class AddHasExternalIssueTrackerToProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160603180330_remove_duplicated_notification_settings.rb b/db/migrate/20160603180330_remove_duplicated_notification_settings.rb index 4f4f58b1619..ee3ad228401 100644 --- a/db/migrate/20160603180330_remove_duplicated_notification_settings.rb +++ b/db/migrate/20160603180330_remove_duplicated_notification_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveDuplicatedNotificationSettings < ActiveRecord::Migration +class RemoveDuplicatedNotificationSettings < ActiveRecord::Migration[4.2] def up duplicates = exec_query(%Q{ SELECT user_id, source_type, source_id diff --git a/db/migrate/20160603182247_add_index_to_notification_settings.rb b/db/migrate/20160603182247_add_index_to_notification_settings.rb index f6ae26d555f..cea178d555c 100644 --- a/db/migrate/20160603182247_add_index_to_notification_settings.rb +++ b/db/migrate/20160603182247_add_index_to_notification_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddIndexToNotificationSettings < ActiveRecord::Migration +class AddIndexToNotificationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb b/db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb index 3c5d2ad910e..523d1e89f28 100644 --- a/db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb +++ b/db/migrate/20160608155312_add_after_sign_up_text_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class AddAfterSignUpTextToApplicationSettings < ActiveRecord::Migration +class AddAfterSignUpTextToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :after_sign_up_text, :text end diff --git a/db/migrate/20160608195742_add_repository_storage_to_projects.rb b/db/migrate/20160608195742_add_repository_storage_to_projects.rb index 0f3664c13ef..e04db5e7868 100644 --- a/db/migrate/20160608195742_add_repository_storage_to_projects.rb +++ b/db/migrate/20160608195742_add_repository_storage_to_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class AddRepositoryStorageToProjects < ActiveRecord::Migration +class AddRepositoryStorageToProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb b/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb index 34c702e3fa6..9b5cfc67d5a 100644 --- a/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb +++ b/db/migrate/20160608211215_add_user_default_external_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddUserDefaultExternalToApplicationSettings < ActiveRecord::Migration +class AddUserDefaultExternalToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb b/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb index 259abb08e47..d5301672dc5 100644 --- a/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb +++ b/db/migrate/20160610140403_remove_notification_setting_not_null_constraints.rb @@ -1,4 +1,4 @@ -class RemoveNotificationSettingNotNullConstraints < ActiveRecord::Migration +class RemoveNotificationSettingNotNullConstraints < ActiveRecord::Migration[4.2] def up change_column :notification_settings, :source_type, :string, null: true change_column :notification_settings, :source_id, :integer, null: true diff --git a/db/migrate/20160610194713_remove_deprecated_issues_tracker_columns_from_projects.rb b/db/migrate/20160610194713_remove_deprecated_issues_tracker_columns_from_projects.rb index 477b2106dea..95e36d7fbcc 100644 --- a/db/migrate/20160610194713_remove_deprecated_issues_tracker_columns_from_projects.rb +++ b/db/migrate/20160610194713_remove_deprecated_issues_tracker_columns_from_projects.rb @@ -1,4 +1,4 @@ -class RemoveDeprecatedIssuesTrackerColumnsFromProjects < ActiveRecord::Migration +class RemoveDeprecatedIssuesTrackerColumnsFromProjects < ActiveRecord::Migration[4.2] def change remove_column :projects, :issues_tracker, :string, default: 'gitlab', null: false remove_column :projects, :issues_tracker_id, :string diff --git a/db/migrate/20160610201627_migrate_users_notification_level.rb b/db/migrate/20160610201627_migrate_users_notification_level.rb index cd8b505de9f..553b7f074f2 100644 --- a/db/migrate/20160610201627_migrate_users_notification_level.rb +++ b/db/migrate/20160610201627_migrate_users_notification_level.rb @@ -1,4 +1,4 @@ -class MigrateUsersNotificationLevel < ActiveRecord::Migration +class MigrateUsersNotificationLevel < ActiveRecord::Migration[4.2] DOWNTIME = false # Migrates only users who changed their default notification level :participating diff --git a/db/migrate/20160610204157_add_deployments.rb b/db/migrate/20160610204157_add_deployments.rb index 0e7e6e747a3..750b7e4010c 100644 --- a/db/migrate/20160610204157_add_deployments.rb +++ b/db/migrate/20160610204157_add_deployments.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/Datetime -class AddDeployments < ActiveRecord::Migration +class AddDeployments < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160610204158_add_environments.rb b/db/migrate/20160610204158_add_environments.rb index 699cee2b246..9deccd2b207 100644 --- a/db/migrate/20160610204158_add_environments.rb +++ b/db/migrate/20160610204158_add_environments.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/Datetime -class AddEnvironments < ActiveRecord::Migration +class AddEnvironments < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160610211845_add_environment_to_builds.rb b/db/migrate/20160610211845_add_environment_to_builds.rb index 990e445ac55..16d5465cafa 100644 --- a/db/migrate/20160610211845_add_environment_to_builds.rb +++ b/db/migrate/20160610211845_add_environment_to_builds.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddEnvironmentToBuilds < ActiveRecord::Migration +class AddEnvironmentToBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160610301627_remove_notification_level_from_users.rb b/db/migrate/20160610301627_remove_notification_level_from_users.rb index 8afb14df2cf..8afea2b6284 100644 --- a/db/migrate/20160610301627_remove_notification_level_from_users.rb +++ b/db/migrate/20160610301627_remove_notification_level_from_users.rb @@ -1,4 +1,4 @@ -class RemoveNotificationLevelFromUsers < ActiveRecord::Migration +class RemoveNotificationLevelFromUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160614182521_add_repository_storage_to_application_settings.rb b/db/migrate/20160614182521_add_repository_storage_to_application_settings.rb index 6dae91b700b..a1bc0e5cd86 100644 --- a/db/migrate/20160614182521_add_repository_storage_to_application_settings.rb +++ b/db/migrate/20160614182521_add_repository_storage_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddRepositoryStorageToApplicationSettings < ActiveRecord::Migration +class AddRepositoryStorageToApplicationSettings < ActiveRecord::Migration[4.2] def change add_column :application_settings, :repository_storage, :string, default: 'default' end diff --git a/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb b/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb index 178e4bf5ed3..1b1dab141f8 100644 --- a/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb +++ b/db/migrate/20160615142710_add_index_on_requested_at_to_members.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexOnRequestedAtToMembers < ActiveRecord::Migration +class AddIndexOnRequestedAtToMembers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb b/db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb index 013904b3f4f..cf0d21bdd5f 100644 --- a/db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb +++ b/db/migrate/20160615173316_add_enabled_git_access_protocols_to_application_settings.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable all -class AddEnabledGitAccessProtocolsToApplicationSettings < ActiveRecord::Migration +class AddEnabledGitAccessProtocolsToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb b/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb index 5336b036bca..720d4d6319e 100644 --- a/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb +++ b/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/UpdateColumnInBatches -class SetMissingStageOnCiBuilds < ActiveRecord::Migration +class SetMissingStageOnCiBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160616084004_change_project_of_environment.rb b/db/migrate/20160616084004_change_project_of_environment.rb index cc1daf9b621..23914a0325a 100644 --- a/db/migrate/20160616084004_change_project_of_environment.rb +++ b/db/migrate/20160616084004_change_project_of_environment.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class ChangeProjectOfEnvironment < ActiveRecord::Migration +class ChangeProjectOfEnvironment < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # When using the methods "add_concurrent_index" or "add_column_with_default" diff --git a/db/migrate/20160616102642_remove_duplicated_keys.rb b/db/migrate/20160616102642_remove_duplicated_keys.rb index 180a75e0998..5cbebabb4e0 100644 --- a/db/migrate/20160616102642_remove_duplicated_keys.rb +++ b/db/migrate/20160616102642_remove_duplicated_keys.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class RemoveDuplicatedKeys < ActiveRecord::Migration +class RemoveDuplicatedKeys < ActiveRecord::Migration[4.2] def up select_all("SELECT fingerprint FROM #{quote_table_name(:keys)} GROUP BY fingerprint HAVING COUNT(*) > 1").each do |row| fingerprint = connection.quote(row['fingerprint']) diff --git a/db/migrate/20160616103005_remove_keys_fingerprint_index_if_exists.rb b/db/migrate/20160616103005_remove_keys_fingerprint_index_if_exists.rb index 081df23f394..afccc40cc67 100644 --- a/db/migrate/20160616103005_remove_keys_fingerprint_index_if_exists.rb +++ b/db/migrate/20160616103005_remove_keys_fingerprint_index_if_exists.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class RemoveKeysFingerprintIndexIfExists < ActiveRecord::Migration +class RemoveKeysFingerprintIndexIfExists < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160616103948_add_unique_index_to_keys_fingerprint.rb b/db/migrate/20160616103948_add_unique_index_to_keys_fingerprint.rb index 76bb6a09639..d619acad3d0 100644 --- a/db/migrate/20160616103948_add_unique_index_to_keys_fingerprint.rb +++ b/db/migrate/20160616103948_add_unique_index_to_keys_fingerprint.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddUniqueIndexToKeysFingerprint < ActiveRecord::Migration +class AddUniqueIndexToKeysFingerprint < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160617301627_add_events_to_notification_settings.rb b/db/migrate/20160617301627_add_events_to_notification_settings.rb index 609596f45e4..109817e3d8a 100644 --- a/db/migrate/20160617301627_add_events_to_notification_settings.rb +++ b/db/migrate/20160617301627_add_events_to_notification_settings.rb @@ -1,4 +1,4 @@ -class AddEventsToNotificationSettings < ActiveRecord::Migration +class AddEventsToNotificationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160620115026_add_index_on_runners_locked.rb b/db/migrate/20160620115026_add_index_on_runners_locked.rb index 48f4495b0a4..c619dc07a91 100644 --- a/db/migrate/20160620115026_add_index_on_runners_locked.rb +++ b/db/migrate/20160620115026_add_index_on_runners_locked.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddIndexOnRunnersLocked < ActiveRecord::Migration +class AddIndexOnRunnersLocked < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb b/db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb index 61dd726fac7..60bd4c36eb6 100644 --- a/db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb +++ b/db/migrate/20160628085157_add_artifacts_size_to_ci_builds.rb @@ -1,4 +1,4 @@ -class AddArtifactsSizeToCiBuilds < ActiveRecord::Migration +class AddArtifactsSizeToCiBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb b/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb index 7c5f76572ef..13e1280b71a 100644 --- a/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb +++ b/db/migrate/20160629025435_add_column_in_progress_merge_commit_sha_to_merge_requests.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddColumnInProgressMergeCommitShaToMergeRequests < ActiveRecord::Migration +class AddColumnInProgressMergeCommitShaToMergeRequests < ActiveRecord::Migration[4.2] def change add_column :merge_requests, :in_progress_merge_commit_sha, :string end diff --git a/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb b/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb index 0c25f87dfb4..8a576b99de0 100644 --- a/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb +++ b/db/migrate/20160703180340_add_index_on_award_emoji_user_and_name.rb @@ -1,7 +1,7 @@ # rubocop:disable all # Migration type: online without errors -class AddIndexOnAwardEmojiUserAndName < ActiveRecord::Migration +class AddIndexOnAwardEmojiUserAndName < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160705054938_add_protected_branches_push_access.rb b/db/migrate/20160705054938_add_protected_branches_push_access.rb index 97aaaf9d2c8..d2e5581a0ed 100644 --- a/db/migrate/20160705054938_add_protected_branches_push_access.rb +++ b/db/migrate/20160705054938_add_protected_branches_push_access.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/Timestamps -class AddProtectedBranchesPushAccess < ActiveRecord::Migration +class AddProtectedBranchesPushAccess < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20160705054952_add_protected_branches_merge_access.rb b/db/migrate/20160705054952_add_protected_branches_merge_access.rb index 51a52a5ac17..a007bd9d4e9 100644 --- a/db/migrate/20160705054952_add_protected_branches_merge_access.rb +++ b/db/migrate/20160705054952_add_protected_branches_merge_access.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/Timestamps -class AddProtectedBranchesMergeAccess < ActiveRecord::Migration +class AddProtectedBranchesMergeAccess < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb b/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb index 1db0df92bec..1bd462cab06 100644 --- a/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb +++ b/db/migrate/20160705055254_move_from_developers_can_merge_to_protected_branches_merge_access.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MoveFromDevelopersCanMergeToProtectedBranchesMergeAccess < ActiveRecord::Migration +class MoveFromDevelopersCanMergeToProtectedBranchesMergeAccess < ActiveRecord::Migration[4.2] DOWNTIME = true DOWNTIME_REASON = <<-HEREDOC We're creating a `merge_access_level` for each `protected_branch`. If a user creates a `protected_branch` while this diff --git a/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb b/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb index 5c3e189bb5b..d480dac777a 100644 --- a/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb +++ b/db/migrate/20160705055308_move_from_developers_can_push_to_protected_branches_push_access.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MoveFromDevelopersCanPushToProtectedBranchesPushAccess < ActiveRecord::Migration +class MoveFromDevelopersCanPushToProtectedBranchesPushAccess < ActiveRecord::Migration[4.2] DOWNTIME = true DOWNTIME_REASON = <<-HEREDOC We're creating a `push_access_level` for each `protected_branch`. If a user creates a `protected_branch` while this diff --git a/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb b/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb index 52a9819c628..fc06664778f 100644 --- a/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb +++ b/db/migrate/20160705055809_remove_developers_can_push_from_protected_branches.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveDevelopersCanPushFromProtectedBranches < ActiveRecord::Migration +class RemoveDevelopersCanPushFromProtectedBranches < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # This is only required for `#down` diff --git a/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb b/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb index 4a7bde7f9f3..21ea605e0ba 100644 --- a/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb +++ b/db/migrate/20160705055813_remove_developers_can_merge_from_protected_branches.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveDevelopersCanMergeFromProtectedBranches < ActiveRecord::Migration +class RemoveDevelopersCanMergeFromProtectedBranches < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # This is only required for `#down` diff --git a/db/migrate/20160705163108_remove_requesters_that_are_owners.rb b/db/migrate/20160705163108_remove_requesters_that_are_owners.rb index 1fca230c019..449c67e1b6a 100644 --- a/db/migrate/20160705163108_remove_requesters_that_are_owners.rb +++ b/db/migrate/20160705163108_remove_requesters_that_are_owners.rb @@ -1,4 +1,4 @@ -class RemoveRequestersThatAreOwners < ActiveRecord::Migration +class RemoveRequestersThatAreOwners < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def up diff --git a/db/migrate/20160707104333_add_lock_to_issuables.rb b/db/migrate/20160707104333_add_lock_to_issuables.rb index 54866d02cbc..fdc3abf46cc 100644 --- a/db/migrate/20160707104333_add_lock_to_issuables.rb +++ b/db/migrate/20160707104333_add_lock_to_issuables.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddLockToIssuables < ActiveRecord::Migration +class AddLockToIssuables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160712171823_remove_award_emojis_with_no_user.rb b/db/migrate/20160712171823_remove_award_emojis_with_no_user.rb index 668c22bb51c..cb83599f006 100644 --- a/db/migrate/20160712171823_remove_award_emojis_with_no_user.rb +++ b/db/migrate/20160712171823_remove_award_emojis_with_no_user.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveAwardEmojisWithNoUser < ActiveRecord::Migration +class RemoveAwardEmojisWithNoUser < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # When using the methods "add_concurrent_index" or "add_column_with_default" diff --git a/db/migrate/20160713200638_add_repository_read_only_to_projects.rb b/db/migrate/20160713200638_add_repository_read_only_to_projects.rb index 8ee8b55f210..ba61bc8cbb0 100644 --- a/db/migrate/20160713200638_add_repository_read_only_to_projects.rb +++ b/db/migrate/20160713200638_add_repository_read_only_to_projects.rb @@ -1,4 +1,4 @@ -class AddRepositoryReadOnlyToProjects < ActiveRecord::Migration +class AddRepositoryReadOnlyToProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb b/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb index f64dfa7675f..4b9ac12253e 100644 --- a/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb +++ b/db/migrate/20160713205315_add_domain_blacklist_to_application_settings.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/SaferBooleanColumn -class AddDomainBlacklistToApplicationSettings < ActiveRecord::Migration +class AddDomainBlacklistToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # When using the methods "add_concurrent_index" or "add_column_with_default" diff --git a/db/migrate/20160713222618_add_usage_ping_to_application_settings.rb b/db/migrate/20160713222618_add_usage_ping_to_application_settings.rb index a7f76cc626e..7ef02316338 100644 --- a/db/migrate/20160713222618_add_usage_ping_to_application_settings.rb +++ b/db/migrate/20160713222618_add_usage_ping_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddUsagePingToApplicationSettings < ActiveRecord::Migration +class AddUsagePingToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160715132507_add_user_id_to_pipeline.rb b/db/migrate/20160715132507_add_user_id_to_pipeline.rb index af0461c4daf..b1e22b1c2bb 100644 --- a/db/migrate/20160715132507_add_user_id_to_pipeline.rb +++ b/db/migrate/20160715132507_add_user_id_to_pipeline.rb @@ -1,4 +1,4 @@ -class AddUserIdToPipeline < ActiveRecord::Migration +class AddUserIdToPipeline < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb b/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb index fec17ffb7f6..8e7ac86a8b7 100644 --- a/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb +++ b/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexForPipelineUserId < ActiveRecord::Migration +class AddIndexForPipelineUserId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb b/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb index 5dc26f8982a..7c3d2f3f14a 100644 --- a/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb +++ b/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class AddRequestAccessEnabledToProjects < ActiveRecord::Migration +class AddRequestAccessEnabledToProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb b/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb index 4a317646788..5144b43641d 100644 --- a/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb +++ b/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class AddRequestAccessEnabledToGroups < ActiveRecord::Migration +class AddRequestAccessEnabledToGroups < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb b/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb index dd15704800a..6a2674fb604 100644 --- a/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb +++ b/db/migrate/20160715230841_rename_application_settings_restricted_signup_domains.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RenameApplicationSettingsRestrictedSignupDomains < ActiveRecord::Migration +class RenameApplicationSettingsRestrictedSignupDomains < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # When using the methods "add_concurrent_index" or "add_column_with_default" diff --git a/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb index 3e084023a65..d403b0a3cc9 100644 --- a/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb +++ b/db/migrate/20160716115710_add_when_and_yaml_variables_to_ci_builds.rb @@ -1,4 +1,4 @@ -class AddWhenAndYamlVariablesToCiBuilds < ActiveRecord::Migration +class AddWhenAndYamlVariablesToCiBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160716115711_add_queued_at_to_ci_builds.rb b/db/migrate/20160716115711_add_queued_at_to_ci_builds.rb index 756910a1fa0..ca6a6105d99 100644 --- a/db/migrate/20160716115711_add_queued_at_to_ci_builds.rb +++ b/db/migrate/20160716115711_add_queued_at_to_ci_builds.rb @@ -1,4 +1,4 @@ -class AddQueuedAtToCiBuilds < ActiveRecord::Migration +class AddQueuedAtToCiBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb b/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb index 55a3e954292..e3e4afaf512 100644 --- a/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb +++ b/db/migrate/20160718153603_add_has_external_wiki_to_projects.rb @@ -1,4 +1,4 @@ -class AddHasExternalWikiToProjects < ActiveRecord::Migration +class AddHasExternalWikiToProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers def change diff --git a/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb b/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb index abe8e701e23..3f806bc46cf 100644 --- a/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb +++ b/db/migrate/20160721081015_drop_and_readd_has_external_wiki_in_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/UpdateColumnInBatches -class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration +class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160722221922_nullify_blank_type_on_notes.rb b/db/migrate/20160722221922_nullify_blank_type_on_notes.rb index c4b78e8e15c..83ca5c1e6ec 100644 --- a/db/migrate/20160722221922_nullify_blank_type_on_notes.rb +++ b/db/migrate/20160722221922_nullify_blank_type_on_notes.rb @@ -1,4 +1,4 @@ -class NullifyBlankTypeOnNotes < ActiveRecord::Migration +class NullifyBlankTypeOnNotes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160724205507_add_resolved_to_notes.rb b/db/migrate/20160724205507_add_resolved_to_notes.rb index 3aca272a3f7..fc56d3b1452 100644 --- a/db/migrate/20160724205507_add_resolved_to_notes.rb +++ b/db/migrate/20160724205507_add_resolved_to_notes.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Datetime -class AddResolvedToNotes < ActiveRecord::Migration +class AddResolvedToNotes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160725083350_add_external_url_to_enviroments.rb b/db/migrate/20160725083350_add_external_url_to_enviroments.rb index 21a8abd310b..e060c6a8499 100644 --- a/db/migrate/20160725083350_add_external_url_to_enviroments.rb +++ b/db/migrate/20160725083350_add_external_url_to_enviroments.rb @@ -1,4 +1,4 @@ -class AddExternalUrlToEnviroments < ActiveRecord::Migration +class AddExternalUrlToEnviroments < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160725104020_merge_request_diff_remove_uniq.rb b/db/migrate/20160725104020_merge_request_diff_remove_uniq.rb index 12e11bc3fbe..d8b4696a246 100644 --- a/db/migrate/20160725104020_merge_request_diff_remove_uniq.rb +++ b/db/migrate/20160725104020_merge_request_diff_remove_uniq.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class MergeRequestDiffRemoveUniq < ActiveRecord::Migration +class MergeRequestDiffRemoveUniq < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160725104452_merge_request_diff_add_index.rb b/db/migrate/20160725104452_merge_request_diff_add_index.rb index 60d81e0bdc0..d3369b3f961 100644 --- a/db/migrate/20160725104452_merge_request_diff_add_index.rb +++ b/db/migrate/20160725104452_merge_request_diff_add_index.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class MergeRequestDiffAddIndex < ActiveRecord::Migration +class MergeRequestDiffAddIndex < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160727163552_create_user_agent_details.rb b/db/migrate/20160727163552_create_user_agent_details.rb index 3eb36f8464f..6ef54deca90 100644 --- a/db/migrate/20160727163552_create_user_agent_details.rb +++ b/db/migrate/20160727163552_create_user_agent_details.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateUserAgentDetails < ActiveRecord::Migration +class CreateUserAgentDetails < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160727191041_create_boards.rb b/db/migrate/20160727191041_create_boards.rb index 9ec8df1b8e8..60ed5508b10 100644 --- a/db/migrate/20160727191041_create_boards.rb +++ b/db/migrate/20160727191041_create_boards.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateBoards < ActiveRecord::Migration +class CreateBoards < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160727193336_create_lists.rb b/db/migrate/20160727193336_create_lists.rb index 3fd95dc8cfc..4591c9a120f 100644 --- a/db/migrate/20160727193336_create_lists.rb +++ b/db/migrate/20160727193336_create_lists.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateLists < ActiveRecord::Migration +class CreateLists < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb b/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb index b800e6d7283..fc3e9f03c74 100644 --- a/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb +++ b/db/migrate/20160728081025_add_pipeline_events_to_web_hooks.rb @@ -1,4 +1,4 @@ -class AddPipelineEventsToWebHooks < ActiveRecord::Migration +class AddPipelineEventsToWebHooks < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160728103734_add_pipeline_events_to_services.rb b/db/migrate/20160728103734_add_pipeline_events_to_services.rb index bcd24fe1566..421859ff5fd 100644 --- a/db/migrate/20160728103734_add_pipeline_events_to_services.rb +++ b/db/migrate/20160728103734_add_pipeline_events_to_services.rb @@ -1,4 +1,4 @@ -class AddPipelineEventsToServices < ActiveRecord::Migration +class AddPipelineEventsToServices < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb b/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb index e28ab31d629..e6abb5e3aaf 100644 --- a/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb +++ b/db/migrate/20160729173930_remove_project_id_from_spam_logs.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveProjectIdFromSpamLogs < ActiveRecord::Migration +class RemoveProjectIdFromSpamLogs < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160801163421_add_expires_at_to_member.rb b/db/migrate/20160801163421_add_expires_at_to_member.rb index 8db0fc60c4b..13ca1d04658 100644 --- a/db/migrate/20160801163421_add_expires_at_to_member.rb +++ b/db/migrate/20160801163421_add_expires_at_to_member.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddExpiresAtToMember < ActiveRecord::Migration +class AddExpiresAtToMember < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160801163709_add_submitted_as_ham_to_spam_logs.rb b/db/migrate/20160801163709_add_submitted_as_ham_to_spam_logs.rb index 20a77000ba8..fde9dee980e 100644 --- a/db/migrate/20160801163709_add_submitted_as_ham_to_spam_logs.rb +++ b/db/migrate/20160801163709_add_submitted_as_ham_to_spam_logs.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddSubmittedAsHamToSpamLogs < ActiveRecord::Migration +class AddSubmittedAsHamToSpamLogs < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160802010328_remove_builds_enable_index_on_projects.rb b/db/migrate/20160802010328_remove_builds_enable_index_on_projects.rb index 6d7733762c8..4ad740e0812 100644 --- a/db/migrate/20160802010328_remove_builds_enable_index_on_projects.rb +++ b/db/migrate/20160802010328_remove_builds_enable_index_on_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class RemoveBuildsEnableIndexOnProjects < ActiveRecord::Migration +class RemoveBuildsEnableIndexOnProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160803161903_add_unique_index_to_lists_label_id.rb b/db/migrate/20160803161903_add_unique_index_to_lists_label_id.rb index 9c1511963f7..f866fe15ec1 100644 --- a/db/migrate/20160803161903_add_unique_index_to_lists_label_id.rb +++ b/db/migrate/20160803161903_add_unique_index_to_lists_label_id.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddUniqueIndexToListsLabelId < ActiveRecord::Migration +class AddUniqueIndexToListsLabelId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160804142904_add_ci_config_file_to_project.rb b/db/migrate/20160804142904_add_ci_config_file_to_project.rb index 341ae555c1b..abd94e63db3 100644 --- a/db/migrate/20160804142904_add_ci_config_file_to_project.rb +++ b/db/migrate/20160804142904_add_ci_config_file_to_project.rb @@ -1,4 +1,4 @@ -class AddCiConfigFileToProject < ActiveRecord::Migration +class AddCiConfigFileToProject < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20160804150737_add_timestamps_to_members_again.rb b/db/migrate/20160804150737_add_timestamps_to_members_again.rb index 6691ba57fbb..4e71197b8e7 100644 --- a/db/migrate/20160804150737_add_timestamps_to_members_again.rb +++ b/db/migrate/20160804150737_add_timestamps_to_members_again.rb @@ -6,7 +6,7 @@ # # Why this happened is lost in the mists of time, so repeat the SQL query # without speculation, just in case more than one person was affected. -class AddTimestampsToMembersAgain < ActiveRecord::Migration +class AddTimestampsToMembersAgain < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20160805041956_add_deleted_at_to_namespaces.rb b/db/migrate/20160805041956_add_deleted_at_to_namespaces.rb index 404c253e18b..a0dfa3259ec 100644 --- a/db/migrate/20160805041956_add_deleted_at_to_namespaces.rb +++ b/db/migrate/20160805041956_add_deleted_at_to_namespaces.rb @@ -1,6 +1,6 @@ # rubocop:disable Migration/Datetime # rubocop:disable RemoveIndex -class AddDeletedAtToNamespaces < ActiveRecord::Migration +class AddDeletedAtToNamespaces < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160808085531_add_token_to_build.rb b/db/migrate/20160808085531_add_token_to_build.rb index 3ed2a103ae3..a1d8945a538 100644 --- a/db/migrate/20160808085531_add_token_to_build.rb +++ b/db/migrate/20160808085531_add_token_to_build.rb @@ -1,4 +1,4 @@ -class AddTokenToBuild < ActiveRecord::Migration +class AddTokenToBuild < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160808085602_add_index_for_build_token.rb b/db/migrate/20160808085602_add_index_for_build_token.rb index 0446b2f2e15..22d50e4165a 100644 --- a/db/migrate/20160808085602_add_index_for_build_token.rb +++ b/db/migrate/20160808085602_add_index_for_build_token.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexForBuildToken < ActiveRecord::Migration +class AddIndexForBuildToken < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160810102349_remove_ci_runner_trigram_indexes.rb b/db/migrate/20160810102349_remove_ci_runner_trigram_indexes.rb index 0cfb637804b..738b93912b6 100644 --- a/db/migrate/20160810102349_remove_ci_runner_trigram_indexes.rb +++ b/db/migrate/20160810102349_remove_ci_runner_trigram_indexes.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveCiRunnerTrigramIndexes < ActiveRecord::Migration +class RemoveCiRunnerTrigramIndexes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160810142633_remove_redundant_indexes.rb b/db/migrate/20160810142633_remove_redundant_indexes.rb index ea7d1f9a436..91f82cf9afa 100644 --- a/db/migrate/20160810142633_remove_redundant_indexes.rb +++ b/db/migrate/20160810142633_remove_redundant_indexes.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class RemoveRedundantIndexes < ActiveRecord::Migration +class RemoveRedundantIndexes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160811172945_add_can_push_to_keys.rb b/db/migrate/20160811172945_add_can_push_to_keys.rb index 5fd303fe8fb..2e78ab0249e 100644 --- a/db/migrate/20160811172945_add_can_push_to_keys.rb +++ b/db/migrate/20160811172945_add_can_push_to_keys.rb @@ -1,4 +1,4 @@ -class AddCanPushToKeys < ActiveRecord::Migration +class AddCanPushToKeys < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb b/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb index 7152bd04331..76b60787323 100644 --- a/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb +++ b/db/migrate/20160816161312_add_column_name_to_u2f_registrations.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddColumnNameToU2fRegistrations < ActiveRecord::Migration +class AddColumnNameToU2fRegistrations < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160817133006_add_koding_to_application_settings.rb b/db/migrate/20160817133006_add_koding_to_application_settings.rb index 46120652d8e..04f9d7be29b 100644 --- a/db/migrate/20160817133006_add_koding_to_application_settings.rb +++ b/db/migrate/20160817133006_add_koding_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/SaferBooleanColumn -class AddKodingToApplicationSettings < ActiveRecord::Migration +class AddKodingToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160817154936_add_discussion_ids_to_notes.rb b/db/migrate/20160817154936_add_discussion_ids_to_notes.rb index 61facce665a..e735eeadac5 100644 --- a/db/migrate/20160817154936_add_discussion_ids_to_notes.rb +++ b/db/migrate/20160817154936_add_discussion_ids_to_notes.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddDiscussionIdsToNotes < ActiveRecord::Migration +class AddDiscussionIdsToNotes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb b/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb index 0ed538b0df8..06f621c6c2e 100644 --- a/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb +++ b/db/migrate/20160818205718_add_expires_at_to_project_group_links.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddExpiresAtToProjectGroupLinks < ActiveRecord::Migration +class AddExpiresAtToProjectGroupLinks < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160819221631_add_index_to_note_discussion_id.rb b/db/migrate/20160819221631_add_index_to_note_discussion_id.rb index 843643c4e95..1dbc0474fd2 100644 --- a/db/migrate/20160819221631_add_index_to_note_discussion_id.rb +++ b/db/migrate/20160819221631_add_index_to_note_discussion_id.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddIndexToNoteDiscussionId < ActiveRecord::Migration +class AddIndexToNoteDiscussionId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160819221833_reset_diff_note_discussion_id_because_it_was_calculated_wrongly.rb b/db/migrate/20160819221833_reset_diff_note_discussion_id_because_it_was_calculated_wrongly.rb index 0c68cf01900..61f593a52c5 100644 --- a/db/migrate/20160819221833_reset_diff_note_discussion_id_because_it_was_calculated_wrongly.rb +++ b/db/migrate/20160819221833_reset_diff_note_discussion_id_because_it_was_calculated_wrongly.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class ResetDiffNoteDiscussionIdBecauseItWasCalculatedWrongly < ActiveRecord::Migration +class ResetDiffNoteDiscussionIdBecauseItWasCalculatedWrongly < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160819232256_add_incoming_email_token_to_users.rb b/db/migrate/20160819232256_add_incoming_email_token_to_users.rb index a004a3802a2..0a7190f632d 100644 --- a/db/migrate/20160819232256_add_incoming_email_token_to_users.rb +++ b/db/migrate/20160819232256_add_incoming_email_token_to_users.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddIncomingEmailTokenToUsers < ActiveRecord::Migration +class AddIncomingEmailTokenToUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160823081327_change_merge_error_to_text.rb b/db/migrate/20160823081327_change_merge_error_to_text.rb index 7920389cd83..23b4f35a776 100644 --- a/db/migrate/20160823081327_change_merge_error_to_text.rb +++ b/db/migrate/20160823081327_change_merge_error_to_text.rb @@ -1,4 +1,4 @@ -class ChangeMergeErrorToText < ActiveRecord::Migration +class ChangeMergeErrorToText < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20160823083941_add_column_scopes_to_personal_access_tokens.rb b/db/migrate/20160823083941_add_column_scopes_to_personal_access_tokens.rb index 91479de840b..4c320123088 100644 --- a/db/migrate/20160823083941_add_column_scopes_to_personal_access_tokens.rb +++ b/db/migrate/20160823083941_add_column_scopes_to_personal_access_tokens.rb @@ -2,7 +2,7 @@ # It's easier to achieve this by adding the column with the `['api']` default, and then changing the default to # `[]`. -class AddColumnScopesToPersonalAccessTokens < ActiveRecord::Migration +class AddColumnScopesToPersonalAccessTokens < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb b/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb index c169084e976..87e6e8b6945 100644 --- a/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb +++ b/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddLfsEnabledToProjects < ActiveRecord::Migration +class AddLfsEnabledToProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160824103857_drop_unused_ci_tables.rb b/db/migrate/20160824103857_drop_unused_ci_tables.rb index 65cf46308d9..8a207683848 100644 --- a/db/migrate/20160824103857_drop_unused_ci_tables.rb +++ b/db/migrate/20160824103857_drop_unused_ci_tables.rb @@ -1,4 +1,4 @@ -class DropUnusedCiTables < ActiveRecord::Migration +class DropUnusedCiTables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160824124900_add_table_issue_metrics.rb b/db/migrate/20160824124900_add_table_issue_metrics.rb index 30d35ef1db2..d505ca13acf 100644 --- a/db/migrate/20160824124900_add_table_issue_metrics.rb +++ b/db/migrate/20160824124900_add_table_issue_metrics.rb @@ -3,7 +3,7 @@ # rubocop:disable Migration/Datetime # rubocop:disable Migration/Timestamps -class AddTableIssueMetrics < ActiveRecord::Migration +class AddTableIssueMetrics < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160825052008_add_table_merge_request_metrics.rb b/db/migrate/20160825052008_add_table_merge_request_metrics.rb index 56b39634dfd..91d7d9ef573 100644 --- a/db/migrate/20160825052008_add_table_merge_request_metrics.rb +++ b/db/migrate/20160825052008_add_table_merge_request_metrics.rb @@ -3,7 +3,7 @@ # rubocop:disable Migration/Datetime # rubocop:disable Migration/Timestamps -class AddTableMergeRequestMetrics < ActiveRecord::Migration +class AddTableMergeRequestMetrics < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160827011312_ensure_lock_version_has_no_default.rb b/db/migrate/20160827011312_ensure_lock_version_has_no_default.rb index 7c55bc23cf2..18c0f0be3eb 100644 --- a/db/migrate/20160827011312_ensure_lock_version_has_no_default.rb +++ b/db/migrate/20160827011312_ensure_lock_version_has_no_default.rb @@ -1,4 +1,4 @@ -class EnsureLockVersionHasNoDefault < ActiveRecord::Migration +class EnsureLockVersionHasNoDefault < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160829114652_add_markdown_cache_columns.rb b/db/migrate/20160829114652_add_markdown_cache_columns.rb index 6ad7237f4cd..b1c5e38c3c4 100644 --- a/db/migrate/20160829114652_add_markdown_cache_columns.rb +++ b/db/migrate/20160829114652_add_markdown_cache_columns.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddMarkdownCacheColumns < ActiveRecord::Migration +class AddMarkdownCacheColumns < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160830203109_add_confidential_issues_events_to_web_hooks.rb b/db/migrate/20160830203109_add_confidential_issues_events_to_web_hooks.rb index a27947212f6..771a6b84648 100644 --- a/db/migrate/20160830203109_add_confidential_issues_events_to_web_hooks.rb +++ b/db/migrate/20160830203109_add_confidential_issues_events_to_web_hooks.rb @@ -1,4 +1,4 @@ -class AddConfidentialIssuesEventsToWebHooks < ActiveRecord::Migration +class AddConfidentialIssuesEventsToWebHooks < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160830211132_add_confidential_issues_events_to_services.rb b/db/migrate/20160830211132_add_confidential_issues_events_to_services.rb index 030e7c39350..a1807264341 100644 --- a/db/migrate/20160830211132_add_confidential_issues_events_to_services.rb +++ b/db/migrate/20160830211132_add_confidential_issues_events_to_services.rb @@ -1,4 +1,4 @@ -class AddConfidentialIssuesEventsToServices < ActiveRecord::Migration +class AddConfidentialIssuesEventsToServices < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160830232601_change_lock_version_not_null.rb b/db/migrate/20160830232601_change_lock_version_not_null.rb index 01c58ed5bdc..1e34b57e53f 100644 --- a/db/migrate/20160830232601_change_lock_version_not_null.rb +++ b/db/migrate/20160830232601_change_lock_version_not_null.rb @@ -1,4 +1,4 @@ -class ChangeLockVersionNotNull < ActiveRecord::Migration +class ChangeLockVersionNotNull < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160831214002_create_project_features.rb b/db/migrate/20160831214002_create_project_features.rb index 7ac6c8ec654..e1e61c3a4a2 100644 --- a/db/migrate/20160831214002_create_project_features.rb +++ b/db/migrate/20160831214002_create_project_features.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateProjectFeatures < ActiveRecord::Migration +class CreateProjectFeatures < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20160831214543_migrate_project_features.rb b/db/migrate/20160831214543_migrate_project_features.rb index 79a5fb29d64..ba7ffd7c9f2 100644 --- a/db/migrate/20160831214543_migrate_project_features.rb +++ b/db/migrate/20160831214543_migrate_project_features.rb @@ -1,4 +1,4 @@ -class MigrateProjectFeatures < ActiveRecord::Migration +class MigrateProjectFeatures < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20160831223750_remove_features_enabled_from_projects.rb b/db/migrate/20160831223750_remove_features_enabled_from_projects.rb index 7414a28ac97..fa5a06c65c1 100644 --- a/db/migrate/20160831223750_remove_features_enabled_from_projects.rb +++ b/db/migrate/20160831223750_remove_features_enabled_from_projects.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class RemoveFeaturesEnabledFromProjects < ActiveRecord::Migration +class RemoveFeaturesEnabledFromProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb b/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb index f8486e3e1a6..2921bb566c9 100644 --- a/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb +++ b/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/UpdateColumnInBatches -class SetConfidentialIssuesEventsOnWebhooks < ActiveRecord::Migration +class SetConfidentialIssuesEventsOnWebhooks < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160901213340_add_lfs_enabled_to_namespaces.rb b/db/migrate/20160901213340_add_lfs_enabled_to_namespaces.rb index fd413d1ca8c..1be5f3f6ab0 100644 --- a/db/migrate/20160901213340_add_lfs_enabled_to_namespaces.rb +++ b/db/migrate/20160901213340_add_lfs_enabled_to_namespaces.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddLfsEnabledToNamespaces < ActiveRecord::Migration +class AddLfsEnabledToNamespaces < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160902122721_drop_gitorious_field_from_application_settings.rb b/db/migrate/20160902122721_drop_gitorious_field_from_application_settings.rb index a80a57254dd..6c2dc58876e 100644 --- a/db/migrate/20160902122721_drop_gitorious_field_from_application_settings.rb +++ b/db/migrate/20160902122721_drop_gitorious_field_from_application_settings.rb @@ -1,4 +1,4 @@ -class DropGitoriousFieldFromApplicationSettings < ActiveRecord::Migration +class DropGitoriousFieldFromApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # After the deploy the caches will be cold anyway diff --git a/db/migrate/20160907131111_add_environment_type_to_environments.rb b/db/migrate/20160907131111_add_environment_type_to_environments.rb index fac73753d5b..34463178fca 100644 --- a/db/migrate/20160907131111_add_environment_type_to_environments.rb +++ b/db/migrate/20160907131111_add_environment_type_to_environments.rb @@ -1,4 +1,4 @@ -class AddEnvironmentTypeToEnvironments < ActiveRecord::Migration +class AddEnvironmentTypeToEnvironments < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb b/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb index 0100e30a733..144ad587a98 100644 --- a/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb +++ b/db/migrate/20160913162434_remove_projects_pushes_since_gc.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class RemoveProjectsPushesSinceGc < ActiveRecord::Migration +class RemoveProjectsPushesSinceGc < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20160913212128_change_artifacts_size_column.rb b/db/migrate/20160913212128_change_artifacts_size_column.rb index 063bbca537c..f2c2aaff9a8 100644 --- a/db/migrate/20160913212128_change_artifacts_size_column.rb +++ b/db/migrate/20160913212128_change_artifacts_size_column.rb @@ -1,4 +1,4 @@ -class ChangeArtifactsSizeColumn < ActiveRecord::Migration +class ChangeArtifactsSizeColumn < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb b/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb index 4da5ec9bd28..81511f9861b 100644 --- a/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb +++ b/db/migrate/20160914131004_only_allow_merge_if_all_discussions_are_resolved.rb @@ -1,4 +1,4 @@ -class OnlyAllowMergeIfAllDiscussionsAreResolved < ActiveRecord::Migration +class OnlyAllowMergeIfAllDiscussionsAreResolved < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160915042921_create_merge_requests_closing_issues.rb b/db/migrate/20160915042921_create_merge_requests_closing_issues.rb index 10c5604bb5c..3efe8c8901b 100644 --- a/db/migrate/20160915042921_create_merge_requests_closing_issues.rb +++ b/db/migrate/20160915042921_create_merge_requests_closing_issues.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/Timestamps -class CreateMergeRequestsClosingIssues < ActiveRecord::Migration +class CreateMergeRequestsClosingIssues < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20160919144305_add_type_to_labels.rb b/db/migrate/20160919144305_add_type_to_labels.rb index d08b339cd27..f897646d264 100644 --- a/db/migrate/20160919144305_add_type_to_labels.rb +++ b/db/migrate/20160919144305_add_type_to_labels.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/UpdateColumnInBatches -class AddTypeToLabels < ActiveRecord::Migration +class AddTypeToLabels < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20160919145149_add_group_id_to_labels.rb b/db/migrate/20160919145149_add_group_id_to_labels.rb index 917c2b0c521..df11a2fc4c8 100644 --- a/db/migrate/20160919145149_add_group_id_to_labels.rb +++ b/db/migrate/20160919145149_add_group_id_to_labels.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddGroupIdToLabels < ActiveRecord::Migration +class AddGroupIdToLabels < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160920160832_add_index_to_labels_title.rb b/db/migrate/20160920160832_add_index_to_labels_title.rb index e38c655baee..e6c87836d4e 100644 --- a/db/migrate/20160920160832_add_index_to_labels_title.rb +++ b/db/migrate/20160920160832_add_index_to_labels_title.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexToLabelsTitle < ActiveRecord::Migration +class AddIndexToLabelsTitle < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20160926145521_add_organization_to_user.rb b/db/migrate/20160926145521_add_organization_to_user.rb index e0bef6e7548..2d8d907591d 100644 --- a/db/migrate/20160926145521_add_organization_to_user.rb +++ b/db/migrate/20160926145521_add_organization_to_user.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddOrganizationToUser < ActiveRecord::Migration +class AddOrganizationToUser < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161006104309_add_state_to_environment.rb b/db/migrate/20161006104309_add_state_to_environment.rb index ccb546654f9..c51dada9bca 100644 --- a/db/migrate/20161006104309_add_state_to_environment.rb +++ b/db/migrate/20161006104309_add_state_to_environment.rb @@ -1,4 +1,4 @@ -class AddStateToEnvironment < ActiveRecord::Migration +class AddStateToEnvironment < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20161007073613_create_user_activities.rb b/db/migrate/20161007073613_create_user_activities.rb index 1d694e777a1..be3ecb17eef 100644 --- a/db/migrate/20161007073613_create_user_activities.rb +++ b/db/migrate/20161007073613_create_user_activities.rb @@ -1,4 +1,4 @@ -class CreateUserActivities < ActiveRecord::Migration +class CreateUserActivities < ActiveRecord::Migration[4.2] DOWNTIME = false # This migration is a no-op. It just exists to match EE. diff --git a/db/migrate/20161007133303_precalculate_trending_projects.rb b/db/migrate/20161007133303_precalculate_trending_projects.rb index b324cd94268..c7a678c9d8f 100644 --- a/db/migrate/20161007133303_precalculate_trending_projects.rb +++ b/db/migrate/20161007133303_precalculate_trending_projects.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class PrecalculateTrendingProjects < ActiveRecord::Migration +class PrecalculateTrendingProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161010142410_create_project_authorizations.rb b/db/migrate/20161010142410_create_project_authorizations.rb index e095ab969f8..b340a4ece19 100644 --- a/db/migrate/20161010142410_create_project_authorizations.rb +++ b/db/migrate/20161010142410_create_project_authorizations.rb @@ -1,4 +1,4 @@ -class CreateProjectAuthorizations < ActiveRecord::Migration +class CreateProjectAuthorizations < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb b/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb index 7b33da3ea11..3024ea81ed8 100644 --- a/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb +++ b/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb @@ -1,4 +1,4 @@ -class AddRepositoryAccessLevelToProjectFeature < ActiveRecord::Migration +class AddRepositoryAccessLevelToProjectFeature < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20161014173530_create_label_priorities.rb b/db/migrate/20161014173530_create_label_priorities.rb index 28937c81e02..c7d60caa7d1 100644 --- a/db/migrate/20161014173530_create_label_priorities.rb +++ b/db/migrate/20161014173530_create_label_priorities.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateLabelPriorities < ActiveRecord::Migration +class CreateLabelPriorities < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161017091941_add_authorized_projects_populated_to_users.rb b/db/migrate/20161017091941_add_authorized_projects_populated_to_users.rb index 8f6be9dd677..11f4fa1a1f7 100644 --- a/db/migrate/20161017091941_add_authorized_projects_populated_to_users.rb +++ b/db/migrate/20161017091941_add_authorized_projects_populated_to_users.rb @@ -1,4 +1,4 @@ -class AddAuthorizedProjectsPopulatedToUsers < ActiveRecord::Migration +class AddAuthorizedProjectsPopulatedToUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161017095000_add_properties_to_deployment.rb b/db/migrate/20161017095000_add_properties_to_deployment.rb index f620ee0de1c..31bd4cd24ad 100644 --- a/db/migrate/20161017095000_add_properties_to_deployment.rb +++ b/db/migrate/20161017095000_add_properties_to_deployment.rb @@ -1,4 +1,4 @@ -class AddPropertiesToDeployment < ActiveRecord::Migration +class AddPropertiesToDeployment < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161017125927_add_unique_index_to_labels.rb b/db/migrate/20161017125927_add_unique_index_to_labels.rb index fcdd79d3b02..b5326789f52 100644 --- a/db/migrate/20161017125927_add_unique_index_to_labels.rb +++ b/db/migrate/20161017125927_add_unique_index_to_labels.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddUniqueIndexToLabels < ActiveRecord::Migration +class AddUniqueIndexToLabels < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161018024215_migrate_labels_priority.rb b/db/migrate/20161018024215_migrate_labels_priority.rb index 22bec2382f4..3e2540c134c 100644 --- a/db/migrate/20161018024215_migrate_labels_priority.rb +++ b/db/migrate/20161018024215_migrate_labels_priority.rb @@ -1,4 +1,4 @@ -class MigrateLabelsPriority < ActiveRecord::Migration +class MigrateLabelsPriority < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161018024550_remove_priority_from_labels.rb b/db/migrate/20161018024550_remove_priority_from_labels.rb index b7416cca664..a7c8d13c630 100644 --- a/db/migrate/20161018024550_remove_priority_from_labels.rb +++ b/db/migrate/20161018024550_remove_priority_from_labels.rb @@ -1,4 +1,4 @@ -class RemovePriorityFromLabels < ActiveRecord::Migration +class RemovePriorityFromLabels < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161018124658_make_project_owners_masters.rb b/db/migrate/20161018124658_make_project_owners_masters.rb index cb93b449067..132c17388dc 100644 --- a/db/migrate/20161018124658_make_project_owners_masters.rb +++ b/db/migrate/20161018124658_make_project_owners_masters.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/UpdateColumnInBatches -class MakeProjectOwnersMasters < ActiveRecord::Migration +class MakeProjectOwnersMasters < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb b/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb index 9f502a8df73..fc6d9784638 100644 --- a/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb +++ b/db/migrate/20161019190736_migrate_sidekiq_queues_from_default.rb @@ -3,7 +3,7 @@ require 'json' # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MigrateSidekiqQueuesFromDefault < ActiveRecord::Migration +class MigrateSidekiqQueuesFromDefault < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161019213545_generate_project_feature_for_projects.rb b/db/migrate/20161019213545_generate_project_feature_for_projects.rb index 4554e14b0df..587bdf60f70 100644 --- a/db/migrate/20161019213545_generate_project_feature_for_projects.rb +++ b/db/migrate/20161019213545_generate_project_feature_for_projects.rb @@ -1,4 +1,4 @@ -class GenerateProjectFeatureForProjects < ActiveRecord::Migration +class GenerateProjectFeatureForProjects < ActiveRecord::Migration[4.2] DOWNTIME = true DOWNTIME_REASON = <<-HEREDOC diff --git a/db/migrate/20161020075734_default_request_access_groups.rb b/db/migrate/20161020075734_default_request_access_groups.rb index 9721cc88724..72aec86167e 100644 --- a/db/migrate/20161020075734_default_request_access_groups.rb +++ b/db/migrate/20161020075734_default_request_access_groups.rb @@ -1,4 +1,4 @@ -class DefaultRequestAccessGroups < ActiveRecord::Migration +class DefaultRequestAccessGroups < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161020075830_default_request_access_projects.rb b/db/migrate/20161020075830_default_request_access_projects.rb index a3a53350e8d..b457e39f838 100644 --- a/db/migrate/20161020075830_default_request_access_projects.rb +++ b/db/migrate/20161020075830_default_request_access_projects.rb @@ -1,4 +1,4 @@ -class DefaultRequestAccessProjects < ActiveRecord::Migration +class DefaultRequestAccessProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb b/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb index b77daf12f68..60352363e42 100644 --- a/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb +++ b/db/migrate/20161020083353_add_pipeline_id_to_merge_request_metrics.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddPipelineIdToMergeRequestMetrics < ActiveRecord::Migration +class AddPipelineIdToMergeRequestMetrics < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb b/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb index 5b6079002c0..7839bee6a5b 100644 --- a/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb +++ b/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddMinimumKeyLengthToApplicationSettings < ActiveRecord::Migration +class AddMinimumKeyLengthToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161021114307_add_lock_version_to_build_and_pipelines.rb b/db/migrate/20161021114307_add_lock_version_to_build_and_pipelines.rb index b47f3aa2810..e172dc3adf2 100644 --- a/db/migrate/20161021114307_add_lock_version_to_build_and_pipelines.rb +++ b/db/migrate/20161021114307_add_lock_version_to_build_and_pipelines.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddLockVersionToBuildAndPipelines < ActiveRecord::Migration +class AddLockVersionToBuildAndPipelines < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb b/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb index fc2e4c12b30..d27f8fc38c8 100644 --- a/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb +++ b/db/migrate/20161024042317_migrate_mailroom_queue_from_default.rb @@ -3,7 +3,7 @@ require 'json' # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MigrateMailroomQueueFromDefault < ActiveRecord::Migration +class MigrateMailroomQueueFromDefault < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161025231710_migrate_jira_to_gem.rb b/db/migrate/20161025231710_migrate_jira_to_gem.rb index 870b00411d2..aa1c59ec9e6 100644 --- a/db/migrate/20161025231710_migrate_jira_to_gem.rb +++ b/db/migrate/20161025231710_migrate_jira_to_gem.rb @@ -1,4 +1,4 @@ -class MigrateJiraToGem < ActiveRecord::Migration +class MigrateJiraToGem < ActiveRecord::Migration[4.2] DOWNTIME = true DOWNTIME_REASON = <<-HEREDOC diff --git a/db/migrate/20161031155516_add_housekeeping_to_application_settings.rb b/db/migrate/20161031155516_add_housekeeping_to_application_settings.rb index 5a451fb575b..963358fe3e5 100644 --- a/db/migrate/20161031155516_add_housekeeping_to_application_settings.rb +++ b/db/migrate/20161031155516_add_housekeeping_to_application_settings.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddHousekeepingToApplicationSettings < ActiveRecord::Migration +class AddHousekeepingToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161031171301_add_project_id_to_subscriptions.rb b/db/migrate/20161031171301_add_project_id_to_subscriptions.rb index 8b1c10a124f..5fd10d9b359 100644 --- a/db/migrate/20161031171301_add_project_id_to_subscriptions.rb +++ b/db/migrate/20161031171301_add_project_id_to_subscriptions.rb @@ -1,4 +1,4 @@ -class AddProjectIdToSubscriptions < ActiveRecord::Migration +class AddProjectIdToSubscriptions < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161031174110_migrate_subscriptions_project_id.rb b/db/migrate/20161031174110_migrate_subscriptions_project_id.rb index 549145a0a65..7f4087fdcd3 100644 --- a/db/migrate/20161031174110_migrate_subscriptions_project_id.rb +++ b/db/migrate/20161031174110_migrate_subscriptions_project_id.rb @@ -1,4 +1,4 @@ -class MigrateSubscriptionsProjectId < ActiveRecord::Migration +class MigrateSubscriptionsProjectId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb b/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb index f263377fbc6..23a775d6282 100644 --- a/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb +++ b/db/migrate/20161031181638_add_unique_index_to_subscriptions.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddUniqueIndexToSubscriptions < ActiveRecord::Migration +class AddUniqueIndexToSubscriptions < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161103171205_rename_repository_storage_column.rb b/db/migrate/20161103171205_rename_repository_storage_column.rb index 93280573939..d6050500e47 100644 --- a/db/migrate/20161103171205_rename_repository_storage_column.rb +++ b/db/migrate/20161103171205_rename_repository_storage_column.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RenameRepositoryStorageColumn < ActiveRecord::Migration +class RenameRepositoryStorageColumn < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb b/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb index 522437b92b4..83c51c83509 100644 --- a/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb +++ b/db/migrate/20161103191444_add_sidekiq_throttling_to_application_settings.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/SaferBooleanColumn -class AddSidekiqThrottlingToApplicationSettings < ActiveRecord::Migration +class AddSidekiqThrottlingToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161106185620_add_project_import_data_project_index.rb b/db/migrate/20161106185620_add_project_import_data_project_index.rb index b3746dc4f6c..46809ca1707 100644 --- a/db/migrate/20161106185620_add_project_import_data_project_index.rb +++ b/db/migrate/20161106185620_add_project_import_data_project_index.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddProjectImportDataProjectIndex < ActiveRecord::Migration +class AddProjectImportDataProjectIndex < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161113184239_create_user_chat_names_table.rb b/db/migrate/20161113184239_create_user_chat_names_table.rb index 62ccb599f2e..078824afdcc 100644 --- a/db/migrate/20161113184239_create_user_chat_names_table.rb +++ b/db/migrate/20161113184239_create_user_chat_names_table.rb @@ -1,6 +1,6 @@ # rubocop:disable Migration/Datetime # rubocop:disable Migration/Timestamps -class CreateUserChatNamesTable < ActiveRecord::Migration +class CreateUserChatNamesTable < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161114024742_add_coverage_regex_to_builds.rb b/db/migrate/20161114024742_add_coverage_regex_to_builds.rb index 88aa5d52b39..631968b4aee 100644 --- a/db/migrate/20161114024742_add_coverage_regex_to_builds.rb +++ b/db/migrate/20161114024742_add_coverage_regex_to_builds.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddCoverageRegexToBuilds < ActiveRecord::Migration +class AddCoverageRegexToBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161115173905_add_start_date_to_milestones.rb b/db/migrate/20161115173905_add_start_date_to_milestones.rb index 413733b8db7..847c4f0bebb 100644 --- a/db/migrate/20161115173905_add_start_date_to_milestones.rb +++ b/db/migrate/20161115173905_add_start_date_to_milestones.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddStartDateToMilestones < ActiveRecord::Migration +class AddStartDateToMilestones < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161117114805_remove_undeleted_groups.rb b/db/migrate/20161117114805_remove_undeleted_groups.rb index 29040583aa2..0a4fe1c05b7 100644 --- a/db/migrate/20161117114805_remove_undeleted_groups.rb +++ b/db/migrate/20161117114805_remove_undeleted_groups.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveUndeletedGroups < ActiveRecord::Migration +class RemoveUndeletedGroups < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20161118183841_add_commit_events_to_services.rb b/db/migrate/20161118183841_add_commit_events_to_services.rb index 4f9b5dd2281..0eb08915118 100644 --- a/db/migrate/20161118183841_add_commit_events_to_services.rb +++ b/db/migrate/20161118183841_add_commit_events_to_services.rb @@ -1,4 +1,4 @@ -class AddCommitEventsToServices < ActiveRecord::Migration +class AddCommitEventsToServices < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161124111390_add_parent_id_to_namespace.rb b/db/migrate/20161124111390_add_parent_id_to_namespace.rb index a6fa1b70a9d..67f6aee2b9c 100644 --- a/db/migrate/20161124111390_add_parent_id_to_namespace.rb +++ b/db/migrate/20161124111390_add_parent_id_to_namespace.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddParentIdToNamespace < ActiveRecord::Migration +class AddParentIdToNamespace < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161124111395_add_index_to_parent_id.rb b/db/migrate/20161124111395_add_index_to_parent_id.rb index 065643e058d..d7a51ec905a 100644 --- a/db/migrate/20161124111395_add_index_to_parent_id.rb +++ b/db/migrate/20161124111395_add_index_to_parent_id.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddIndexToParentId < ActiveRecord::Migration +class AddIndexToParentId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161124111402_add_routes_table.rb b/db/migrate/20161124111402_add_routes_table.rb index f5241d906d1..36f49ef8c97 100644 --- a/db/migrate/20161124111402_add_routes_table.rb +++ b/db/migrate/20161124111402_add_routes_table.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/Timestamps -class AddRoutesTable < ActiveRecord::Migration +class AddRoutesTable < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb b/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb index bcdae272209..6cdfb737f42 100644 --- a/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb +++ b/db/migrate/20161124141322_migrate_process_commit_worker_jobs.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MigrateProcessCommitWorkerJobs < ActiveRecord::Migration +class MigrateProcessCommitWorkerJobs < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers class Project < ActiveRecord::Base diff --git a/db/migrate/20161128095517_add_in_reply_to_discussion_id_to_sent_notifications.rb b/db/migrate/20161128095517_add_in_reply_to_discussion_id_to_sent_notifications.rb index d56d83ca1d3..a2971486014 100644 --- a/db/migrate/20161128095517_add_in_reply_to_discussion_id_to_sent_notifications.rb +++ b/db/migrate/20161128095517_add_in_reply_to_discussion_id_to_sent_notifications.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddInReplyToDiscussionIdToSentNotifications < ActiveRecord::Migration +class AddInReplyToDiscussionIdToSentNotifications < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161128142110_remove_unnecessary_indexes.rb b/db/migrate/20161128142110_remove_unnecessary_indexes.rb index 699a9368eb3..b6c6e303ec7 100644 --- a/db/migrate/20161128142110_remove_unnecessary_indexes.rb +++ b/db/migrate/20161128142110_remove_unnecessary_indexes.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class RemoveUnnecessaryIndexes < ActiveRecord::Migration +class RemoveUnnecessaryIndexes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20161128161412_add_html_emails_enabled_to_application_settings.rb b/db/migrate/20161128161412_add_html_emails_enabled_to_application_settings.rb index 38f5781745b..63139eb97bd 100644 --- a/db/migrate/20161128161412_add_html_emails_enabled_to_application_settings.rb +++ b/db/migrate/20161128161412_add_html_emails_enabled_to_application_settings.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/SaferBooleanColumn -class AddHtmlEmailsEnabledToApplicationSettings < ActiveRecord::Migration +class AddHtmlEmailsEnabledToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161130095245_fill_routes_table.rb b/db/migrate/20161130095245_fill_routes_table.rb index c3536d6d911..712be187c7c 100644 --- a/db/migrate/20161130095245_fill_routes_table.rb +++ b/db/migrate/20161130095245_fill_routes_table.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class FillRoutesTable < ActiveRecord::Migration +class FillRoutesTable < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161130101252_fill_projects_routes_table.rb b/db/migrate/20161130101252_fill_projects_routes_table.rb index 56ba6fcdbe3..1900d6c8013 100644 --- a/db/migrate/20161130101252_fill_projects_routes_table.rb +++ b/db/migrate/20161130101252_fill_projects_routes_table.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class FillProjectsRoutesTable < ActiveRecord::Migration +class FillProjectsRoutesTable < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161201001911_add_plant_uml_url_to_application_settings.rb b/db/migrate/20161201001911_add_plant_uml_url_to_application_settings.rb index b8d8742ae40..79558a6b3b9 100644 --- a/db/migrate/20161201001911_add_plant_uml_url_to_application_settings.rb +++ b/db/migrate/20161201001911_add_plant_uml_url_to_application_settings.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddPlantUmlUrlToApplicationSettings < ActiveRecord::Migration +class AddPlantUmlUrlToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161201155511_create_project_statistics.rb b/db/migrate/20161201155511_create_project_statistics.rb index 26e6d3623eb..6dcb5adb82b 100644 --- a/db/migrate/20161201155511_create_project_statistics.rb +++ b/db/migrate/20161201155511_create_project_statistics.rb @@ -1,4 +1,4 @@ -class CreateProjectStatistics < ActiveRecord::Migration +class CreateProjectStatistics < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161201160452_migrate_project_statistics.rb b/db/migrate/20161201160452_migrate_project_statistics.rb index 82fbdf02444..249dee918bb 100644 --- a/db/migrate/20161201160452_migrate_project_statistics.rb +++ b/db/migrate/20161201160452_migrate_project_statistics.rb @@ -1,4 +1,4 @@ -class MigrateProjectStatistics < ActiveRecord::Migration +class MigrateProjectStatistics < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161202152031_remove_duplicates_from_routes.rb b/db/migrate/20161202152031_remove_duplicates_from_routes.rb index d73b0847506..0615f683859 100644 --- a/db/migrate/20161202152031_remove_duplicates_from_routes.rb +++ b/db/migrate/20161202152031_remove_duplicates_from_routes.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveDuplicatesFromRoutes < ActiveRecord::Migration +class RemoveDuplicatesFromRoutes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161202152035_add_index_to_routes.rb b/db/migrate/20161202152035_add_index_to_routes.rb index 552b5fab68c..ad2e0cd13c9 100644 --- a/db/migrate/20161202152035_add_index_to_routes.rb +++ b/db/migrate/20161202152035_add_index_to_routes.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddIndexToRoutes < ActiveRecord::Migration +class AddIndexToRoutes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161206003819_add_plant_uml_enabled_to_application_settings.rb b/db/migrate/20161206003819_add_plant_uml_enabled_to_application_settings.rb index 7f56ecf4c9e..bb44d56ee56 100644 --- a/db/migrate/20161206003819_add_plant_uml_enabled_to_application_settings.rb +++ b/db/migrate/20161206003819_add_plant_uml_enabled_to_application_settings.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/SaferBooleanColumn -class AddPlantUmlEnabledToApplicationSettings < ActiveRecord::Migration +class AddPlantUmlEnabledToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161206153749_remove_uniq_path_index_from_namespace.rb b/db/migrate/20161206153749_remove_uniq_path_index_from_namespace.rb index 7d39c2ae626..c301d76646e 100644 --- a/db/migrate/20161206153749_remove_uniq_path_index_from_namespace.rb +++ b/db/migrate/20161206153749_remove_uniq_path_index_from_namespace.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class RemoveUniqPathIndexFromNamespace < ActiveRecord::Migration +class RemoveUniqPathIndexFromNamespace < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20161206153751_add_path_index_to_namespace.rb b/db/migrate/20161206153751_add_path_index_to_namespace.rb index 623037e35cd..f0848cc59a5 100644 --- a/db/migrate/20161206153751_add_path_index_to_namespace.rb +++ b/db/migrate/20161206153751_add_path_index_to_namespace.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddPathIndexToNamespace < ActiveRecord::Migration +class AddPathIndexToNamespace < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20161206153753_remove_uniq_name_index_from_namespace.rb b/db/migrate/20161206153753_remove_uniq_name_index_from_namespace.rb index 9296ae36aa5..13660cec7aa 100644 --- a/db/migrate/20161206153753_remove_uniq_name_index_from_namespace.rb +++ b/db/migrate/20161206153753_remove_uniq_name_index_from_namespace.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class RemoveUniqNameIndexFromNamespace < ActiveRecord::Migration +class RemoveUniqNameIndexFromNamespace < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20161206153754_add_name_index_to_namespace.rb b/db/migrate/20161206153754_add_name_index_to_namespace.rb index 2bbd039ff27..14152a6dc07 100644 --- a/db/migrate/20161206153754_add_name_index_to_namespace.rb +++ b/db/migrate/20161206153754_add_name_index_to_namespace.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddNameIndexToNamespace < ActiveRecord::Migration +class AddNameIndexToNamespace < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb b/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb index 61baa187225..420f0ccb45c 100644 --- a/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb +++ b/db/migrate/20161207231620_fixup_environment_name_uniqueness.rb @@ -1,4 +1,4 @@ -class FixupEnvironmentNameUniqueness < ActiveRecord::Migration +class FixupEnvironmentNameUniqueness < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161207231621_create_environment_name_unique_index.rb b/db/migrate/20161207231621_create_environment_name_unique_index.rb index 15093350f12..28d22664405 100644 --- a/db/migrate/20161207231621_create_environment_name_unique_index.rb +++ b/db/migrate/20161207231621_create_environment_name_unique_index.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class CreateEnvironmentNameUniqueIndex < ActiveRecord::Migration +class CreateEnvironmentNameUniqueIndex < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20161207231626_add_environment_slug.rb b/db/migrate/20161207231626_add_environment_slug.rb index 35b251e01ce..993b9bd3330 100644 --- a/db/migrate/20161207231626_add_environment_slug.rb +++ b/db/migrate/20161207231626_add_environment_slug.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddEnvironmentSlug < ActiveRecord::Migration +class AddEnvironmentSlug < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb b/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb index 42a90091b87..57606a33cb9 100644 --- a/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb +++ b/db/migrate/20161209153400_add_unique_index_for_environment_slug.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddUniqueIndexForEnvironmentSlug < ActiveRecord::Migration +class AddUniqueIndexForEnvironmentSlug < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb b/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb index e63d5927f86..e8ea9cf8fda 100644 --- a/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb +++ b/db/migrate/20161209165216_create_doorkeeper_openid_connect_tables.rb @@ -1,4 +1,4 @@ -class CreateDoorkeeperOpenidConnectTables < ActiveRecord::Migration +class CreateDoorkeeperOpenidConnectTables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161212142807_add_lower_path_index_to_routes.rb b/db/migrate/20161212142807_add_lower_path_index_to_routes.rb index 76db5179795..92a12dbc699 100644 --- a/db/migrate/20161212142807_add_lower_path_index_to_routes.rb +++ b/db/migrate/20161212142807_add_lower_path_index_to_routes.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddLowerPathIndexToRoutes < ActiveRecord::Migration +class AddLowerPathIndexToRoutes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb b/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb index dc38d0ac906..babac6bfc4f 100644 --- a/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb +++ b/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb @@ -1,4 +1,4 @@ -class ChangeSlackServiceToSlackNotificationService < ActiveRecord::Migration +class ChangeSlackServiceToSlackNotificationService < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161220141214_remove_dot_git_from_group_names.rb b/db/migrate/20161220141214_remove_dot_git_from_group_names.rb index 8fb1f9d5e73..00b178e6289 100644 --- a/db/migrate/20161220141214_remove_dot_git_from_group_names.rb +++ b/db/migrate/20161220141214_remove_dot_git_from_group_names.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveDotGitFromGroupNames < ActiveRecord::Migration +class RemoveDotGitFromGroupNames < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers include Gitlab::ShellAdapter diff --git a/db/migrate/20161221152132_add_last_used_at_to_key.rb b/db/migrate/20161221152132_add_last_used_at_to_key.rb index 86dc7870247..a5b3f2b6f4b 100644 --- a/db/migrate/20161221152132_add_last_used_at_to_key.rb +++ b/db/migrate/20161221152132_add_last_used_at_to_key.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Datetime -class AddLastUsedAtToKey < ActiveRecord::Migration +class AddLastUsedAtToKey < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161223034433_add_estimate_to_issuables_ce.rb b/db/migrate/20161223034433_add_estimate_to_issuables_ce.rb index d5116dfab49..75bea41387c 100644 --- a/db/migrate/20161223034433_add_estimate_to_issuables_ce.rb +++ b/db/migrate/20161223034433_add_estimate_to_issuables_ce.rb @@ -1,4 +1,4 @@ -class AddEstimateToIssuablesCe < ActiveRecord::Migration +class AddEstimateToIssuablesCe < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161223034646_create_timelogs_ce.rb b/db/migrate/20161223034646_create_timelogs_ce.rb index 1e894cc9161..489a2b35dfd 100644 --- a/db/migrate/20161223034646_create_timelogs_ce.rb +++ b/db/migrate/20161223034646_create_timelogs_ce.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateTimelogsCe < ActiveRecord::Migration +class CreateTimelogsCe < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161226122833_remove_dot_git_from_usernames.rb b/db/migrate/20161226122833_remove_dot_git_from_usernames.rb index 61dcc8c54f5..042fcef3587 100644 --- a/db/migrate/20161226122833_remove_dot_git_from_usernames.rb +++ b/db/migrate/20161226122833_remove_dot_git_from_usernames.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveDotGitFromUsernames < ActiveRecord::Migration +class RemoveDotGitFromUsernames < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers include Gitlab::ShellAdapter diff --git a/db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb b/db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb index 6b15e5caccf..df5714278f2 100644 --- a/db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb +++ b/db/migrate/20161227192806_rename_slack_and_mattermost_notification_services.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/UpdateColumnInBatches -class RenameSlackAndMattermostNotificationServices < ActiveRecord::Migration +class RenameSlackAndMattermostNotificationServices < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb b/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb index 16f7cc487ce..f9f8f11316d 100644 --- a/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb +++ b/db/migrate/20161228124936_change_expires_at_to_date_in_personal_access_tokens.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/Datetime -class ChangeExpiresAtToDateInPersonalAccessTokens < ActiveRecord::Migration +class ChangeExpiresAtToDateInPersonalAccessTokens < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20161228135550_add_impersonation_to_personal_access_tokens.rb b/db/migrate/20161228135550_add_impersonation_to_personal_access_tokens.rb index ea9caceaa2c..489d7fb8b75 100644 --- a/db/migrate/20161228135550_add_impersonation_to_personal_access_tokens.rb +++ b/db/migrate/20161228135550_add_impersonation_to_personal_access_tokens.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddImpersonationToPersonalAccessTokens < ActiveRecord::Migration +class AddImpersonationToPersonalAccessTokens < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170120131253_create_chat_teams.rb b/db/migrate/20170120131253_create_chat_teams.rb index 52208821911..e9b9bd7bd2f 100644 --- a/db/migrate/20170120131253_create_chat_teams.rb +++ b/db/migrate/20170120131253_create_chat_teams.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateChatTeams < ActiveRecord::Migration +class CreateChatTeams < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20170121123724_add_index_to_ci_builds_for_status_runner_id_and_type.rb b/db/migrate/20170121123724_add_index_to_ci_builds_for_status_runner_id_and_type.rb index c006098fafd..cc1a4d2db59 100644 --- a/db/migrate/20170121123724_add_index_to_ci_builds_for_status_runner_id_and_type.rb +++ b/db/migrate/20170121123724_add_index_to_ci_builds_for_status_runner_id_and_type.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexToCiBuildsForStatusRunnerIdAndType < ActiveRecord::Migration +class AddIndexToCiBuildsForStatusRunnerIdAndType < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170121130655_add_index_to_ci_runners_for_is_shared.rb b/db/migrate/20170121130655_add_index_to_ci_runners_for_is_shared.rb index 00aa0b311b1..1b83ce4cfe3 100644 --- a/db/migrate/20170121130655_add_index_to_ci_runners_for_is_shared.rb +++ b/db/migrate/20170121130655_add_index_to_ci_runners_for_is_shared.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexToCiRunnersForIsShared < ActiveRecord::Migration +class AddIndexToCiRunnersForIsShared < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb b/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb index a7d4e141a1a..ffd966be086 100644 --- a/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb +++ b/db/migrate/20170124174637_add_foreign_keys_to_timelogs.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddForeignKeysToTimelogs < ActiveRecord::Migration +class AddForeignKeysToTimelogs < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170124193147_add_two_factor_columns_to_namespaces.rb b/db/migrate/20170124193147_add_two_factor_columns_to_namespaces.rb index ae37da275fd..c520a5f826f 100644 --- a/db/migrate/20170124193147_add_two_factor_columns_to_namespaces.rb +++ b/db/migrate/20170124193147_add_two_factor_columns_to_namespaces.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class AddTwoFactorColumnsToNamespaces < ActiveRecord::Migration +class AddTwoFactorColumnsToNamespaces < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170124193205_add_two_factor_columns_to_users.rb b/db/migrate/20170124193205_add_two_factor_columns_to_users.rb index 8d4aefa4365..b3d2a42eedf 100644 --- a/db/migrate/20170124193205_add_two_factor_columns_to_users.rb +++ b/db/migrate/20170124193205_add_two_factor_columns_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class AddTwoFactorColumnsToUsers < ActiveRecord::Migration +class AddTwoFactorColumnsToUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170126174819_add_terminal_max_session_time_to_application_settings.rb b/db/migrate/20170126174819_add_terminal_max_session_time_to_application_settings.rb index 334f53f9145..70f1669108a 100644 --- a/db/migrate/20170126174819_add_terminal_max_session_time_to_application_settings.rb +++ b/db/migrate/20170126174819_add_terminal_max_session_time_to_application_settings.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddTerminalMaxSessionTimeToApplicationSettings < ActiveRecord::Migration +class AddTerminalMaxSessionTimeToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb b/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb index 0ee4229d1f8..2e2fecfa2a7 100644 --- a/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb +++ b/db/migrate/20170127032550_remove_backlog_lists_from_boards.rb @@ -1,4 +1,4 @@ -class RemoveBacklogListsFromBoards < ActiveRecord::Migration +class RemoveBacklogListsFromBoards < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20170130204620_add_index_to_project_authorizations.rb b/db/migrate/20170130204620_add_index_to_project_authorizations.rb index f256251516a..28c4480e9c6 100644 --- a/db/migrate/20170130204620_add_index_to_project_authorizations.rb +++ b/db/migrate/20170130204620_add_index_to_project_authorizations.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexToProjectAuthorizations < ActiveRecord::Migration +class AddIndexToProjectAuthorizations < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170130221926_create_uploads.rb b/db/migrate/20170130221926_create_uploads.rb index 4d9fa0bb692..fd3f65b54c1 100644 --- a/db/migrate/20170130221926_create_uploads.rb +++ b/db/migrate/20170130221926_create_uploads.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Datetime -class CreateUploads < ActiveRecord::Migration +class CreateUploads < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170131221752_add_relative_position_to_issues.rb b/db/migrate/20170131221752_add_relative_position_to_issues.rb index fd18d8b6a60..126cb9e5415 100644 --- a/db/migrate/20170131221752_add_relative_position_to_issues.rb +++ b/db/migrate/20170131221752_add_relative_position_to_issues.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddRelativePositionToIssues < ActiveRecord::Migration +class AddRelativePositionToIssues < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170204172458_add_name_to_route.rb b/db/migrate/20170204172458_add_name_to_route.rb index 38ed1ad9039..e7c94aceb26 100644 --- a/db/migrate/20170204172458_add_name_to_route.rb +++ b/db/migrate/20170204172458_add_name_to_route.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddNameToRoute < ActiveRecord::Migration +class AddNameToRoute < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb b/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb index b1b0a601007..746322885b1 100644 --- a/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb +++ b/db/migrate/20170204181513_add_index_to_labels_for_type_and_project.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexToLabelsForTypeAndProject < ActiveRecord::Migration +class AddIndexToLabelsForTypeAndProject < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170206071414_add_recaptcha_verified_to_spam_logs.rb b/db/migrate/20170206071414_add_recaptcha_verified_to_spam_logs.rb index 44372334d21..06338ac943e 100644 --- a/db/migrate/20170206071414_add_recaptcha_verified_to_spam_logs.rb +++ b/db/migrate/20170206071414_add_recaptcha_verified_to_spam_logs.rb @@ -1,4 +1,4 @@ -class AddRecaptchaVerifiedToSpamLogs < ActiveRecord::Migration +class AddRecaptchaVerifiedToSpamLogs < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170206115204_add_column_ghost_to_users.rb b/db/migrate/20170206115204_add_column_ghost_to_users.rb index cc1eeda1160..4b86814e05d 100644 --- a/db/migrate/20170206115204_add_column_ghost_to_users.rb +++ b/db/migrate/20170206115204_add_column_ghost_to_users.rb @@ -1,4 +1,4 @@ -class AddColumnGhostToUsers < ActiveRecord::Migration +class AddColumnGhostToUsers < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb b/db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb index 2c20f6a48ab..d0b440b8ccb 100644 --- a/db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb +++ b/db/migrate/20170210062829_add_index_to_labels_for_title_and_project.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexToLabelsForTitleAndProject < ActiveRecord::Migration +class AddIndexToLabelsForTitleAndProject < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170210075922_add_index_to_ci_trigger_requests_for_commit_id.rb b/db/migrate/20170210075922_add_index_to_ci_trigger_requests_for_commit_id.rb index c31057f2617..753d6c77e35 100644 --- a/db/migrate/20170210075922_add_index_to_ci_trigger_requests_for_commit_id.rb +++ b/db/migrate/20170210075922_add_index_to_ci_trigger_requests_for_commit_id.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexToCiTriggerRequestsForCommitId < ActiveRecord::Migration +class AddIndexToCiTriggerRequestsForCommitId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170210103609_add_index_to_user_agent_detail.rb b/db/migrate/20170210103609_add_index_to_user_agent_detail.rb index ba4976a5ce8..a2d6528ea82 100644 --- a/db/migrate/20170210103609_add_index_to_user_agent_detail.rb +++ b/db/migrate/20170210103609_add_index_to_user_agent_detail.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddIndexToUserAgentDetail < ActiveRecord::Migration +class AddIndexToUserAgentDetail < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb b/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb index 9ab970134be..c286354f476 100644 --- a/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb +++ b/db/migrate/20170210131347_add_unique_ips_limit_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddUniqueIpsLimitToApplicationSettings < ActiveRecord::Migration +class AddUniqueIpsLimitToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false disable_ddl_transaction! 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 index e0e3ff8957a..84814c2f8f2 100644 --- a/db/migrate/20170214084746_add_default_artifacts_expiration_to_application_settings.rb +++ b/db/migrate/20170214084746_add_default_artifacts_expiration_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddDefaultArtifactsExpirationToApplicationSettings < ActiveRecord::Migration +class AddDefaultArtifactsExpirationToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb b/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb index 884c4e569d6..be393bd496d 100644 --- a/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb +++ b/db/migrate/20170216135621_add_index_for_latest_successful_pipeline.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class AddIndexForLatestSuccessfulPipeline < ActiveRecord::Migration +class AddIndexForLatestSuccessfulPipeline < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170216141440_drop_index_for_builds_project_status.rb b/db/migrate/20170216141440_drop_index_for_builds_project_status.rb index 56ad566ca67..7edf7dd7e10 100644 --- a/db/migrate/20170216141440_drop_index_for_builds_project_status.rb +++ b/db/migrate/20170216141440_drop_index_for_builds_project_status.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class DropIndexForBuildsProjectStatus < ActiveRecord::Migration +class DropIndexForBuildsProjectStatus < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170217132157_rename_merge_when_build_succeeds.rb b/db/migrate/20170217132157_rename_merge_when_build_succeeds.rb index 9011526565d..ee8838eff56 100644 --- a/db/migrate/20170217132157_rename_merge_when_build_succeeds.rb +++ b/db/migrate/20170217132157_rename_merge_when_build_succeeds.rb @@ -1,7 +1,7 @@ # 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 +class RenameMergeWhenBuildSucceeds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. 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 index b2b68ff72d1..5d35216f3af 100644 --- a/db/migrate/20170217151947_rename_only_allow_merge_if_build_succeeds.rb +++ b/db/migrate/20170217151947_rename_only_allow_merge_if_build_succeeds.rb @@ -1,7 +1,7 @@ # 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 +class RenameOnlyAllowMergeIfBuildSucceeds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170217151948_add_owner_id_to_triggers.rb b/db/migrate/20170217151948_add_owner_id_to_triggers.rb index 16d7cc5bed6..a28711ae59a 100644 --- a/db/migrate/20170217151948_add_owner_id_to_triggers.rb +++ b/db/migrate/20170217151948_add_owner_id_to_triggers.rb @@ -1,4 +1,4 @@ -class AddOwnerIdToTriggers < ActiveRecord::Migration +class AddOwnerIdToTriggers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170217151949_add_description_to_triggers.rb b/db/migrate/20170217151949_add_description_to_triggers.rb index 1dca0e37412..27cb4b3ab31 100644 --- a/db/migrate/20170217151949_add_description_to_triggers.rb +++ b/db/migrate/20170217151949_add_description_to_triggers.rb @@ -1,4 +1,4 @@ -class AddDescriptionToTriggers < ActiveRecord::Migration +class AddDescriptionToTriggers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170222111732_create_gpg_keys.rb b/db/migrate/20170222111732_create_gpg_keys.rb index 541228e8735..c1d83012ce3 100644 --- a/db/migrate/20170222111732_create_gpg_keys.rb +++ b/db/migrate/20170222111732_create_gpg_keys.rb @@ -1,4 +1,4 @@ -class CreateGpgKeys < ActiveRecord::Migration +class CreateGpgKeys < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170222143317_drop_ci_projects.rb b/db/migrate/20170222143317_drop_ci_projects.rb index 9973e53501c..8cff15d341d 100644 --- a/db/migrate/20170222143317_drop_ci_projects.rb +++ b/db/migrate/20170222143317_drop_ci_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Datetime -class DropCiProjects < ActiveRecord::Migration +class DropCiProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170222143500_remove_old_project_id_columns.rb b/db/migrate/20170222143500_remove_old_project_id_columns.rb index 268144a2552..cd9472ff747 100644 --- a/db/migrate/20170222143500_remove_old_project_id_columns.rb +++ b/db/migrate/20170222143500_remove_old_project_id_columns.rb @@ -1,5 +1,5 @@ # rubocop:disable RemoveIndex -class RemoveOldProjectIdColumns < ActiveRecord::Migration +class RemoveOldProjectIdColumns < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170222143603_rename_gl_project_id_to_project_id.rb b/db/migrate/20170222143603_rename_gl_project_id_to_project_id.rb index 7c19d471557..390b2c33d91 100644 --- a/db/migrate/20170222143603_rename_gl_project_id_to_project_id.rb +++ b/db/migrate/20170222143603_rename_gl_project_id_to_project_id.rb @@ -1,4 +1,4 @@ -class RenameGlProjectIdToProjectId < ActiveRecord::Migration +class RenameGlProjectIdToProjectId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20170301125302_add_printing_merge_request_link_enabled_to_project.rb b/db/migrate/20170301125302_add_printing_merge_request_link_enabled_to_project.rb index 7ad01a04815..efb846e8c3a 100644 --- a/db/migrate/20170301125302_add_printing_merge_request_link_enabled_to_project.rb +++ b/db/migrate/20170301125302_add_printing_merge_request_link_enabled_to_project.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class AddPrintingMergeRequestLinkEnabledToProject < ActiveRecord::Migration +class AddPrintingMergeRequestLinkEnabledToProject < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170301195939_rename_ci_commits_to_ci_pipelines.rb b/db/migrate/20170301195939_rename_ci_commits_to_ci_pipelines.rb index 4f061d96392..791e9c845a6 100644 --- a/db/migrate/20170301195939_rename_ci_commits_to_ci_pipelines.rb +++ b/db/migrate/20170301195939_rename_ci_commits_to_ci_pipelines.rb @@ -1,4 +1,4 @@ -class RenameCiCommitsToCiPipelines < ActiveRecord::Migration +class RenameCiCommitsToCiPipelines < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb b/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb index 1a77d5934a3..7a424518103 100644 --- a/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb +++ b/db/migrate/20170301205639_remove_unused_ci_tables_and_columns.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Datetime -class RemoveUnusedCiTablesAndColumns < ActiveRecord::Migration +class RemoveUnusedCiTablesAndColumns < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/migrate/20170305180853_add_auto_cancel_pending_pipelines_to_project.rb b/db/migrate/20170305180853_add_auto_cancel_pending_pipelines_to_project.rb index f335e77fb5e..bd143dd005f 100644 --- a/db/migrate/20170305180853_add_auto_cancel_pending_pipelines_to_project.rb +++ b/db/migrate/20170305180853_add_auto_cancel_pending_pipelines_to_project.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class AddAutoCancelPendingPipelinesToProject < ActiveRecord::Migration +class AddAutoCancelPendingPipelinesToProject < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170305203726_add_owner_id_foreign_key.rb b/db/migrate/20170305203726_add_owner_id_foreign_key.rb index 5fbdc45f1a7..b3bd441ff9c 100644 --- a/db/migrate/20170305203726_add_owner_id_foreign_key.rb +++ b/db/migrate/20170305203726_add_owner_id_foreign_key.rb @@ -1,4 +1,4 @@ -class AddOwnerIdForeignKey < ActiveRecord::Migration +class AddOwnerIdForeignKey < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170307125949_add_last_activity_on_to_users.rb b/db/migrate/20170307125949_add_last_activity_on_to_users.rb index 0100836b473..42331eab753 100644 --- a/db/migrate/20170307125949_add_last_activity_on_to_users.rb +++ b/db/migrate/20170307125949_add_last_activity_on_to_users.rb @@ -1,4 +1,4 @@ -class AddLastActivityOnToUsers < ActiveRecord::Migration +class AddLastActivityOnToUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170309173138_create_protected_tags.rb b/db/migrate/20170309173138_create_protected_tags.rb index 4684c9964c4..f518b500bd4 100644 --- a/db/migrate/20170309173138_create_protected_tags.rb +++ b/db/migrate/20170309173138_create_protected_tags.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateProtectedTags < ActiveRecord::Migration +class CreateProtectedTags < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb b/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb index 1690ce90564..26187a9e8b3 100644 --- a/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb +++ b/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb @@ -1,4 +1,4 @@ -class AddAutoCanceledByIdToPipeline < ActiveRecord::Migration +class AddAutoCanceledByIdToPipeline < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170312114529_add_auto_canceled_by_id_foreign_key_to_pipeline.rb b/db/migrate/20170312114529_add_auto_canceled_by_id_foreign_key_to_pipeline.rb index 1e7b02ecf0e..a2b5c1c4533 100644 --- a/db/migrate/20170312114529_add_auto_canceled_by_id_foreign_key_to_pipeline.rb +++ b/db/migrate/20170312114529_add_auto_canceled_by_id_foreign_key_to_pipeline.rb @@ -1,4 +1,4 @@ -class AddAutoCanceledByIdForeignKeyToPipeline < ActiveRecord::Migration +class AddAutoCanceledByIdForeignKeyToPipeline < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170313213916_add_index_to_user_ghost.rb b/db/migrate/20170313213916_add_index_to_user_ghost.rb index fe5847ed225..66e57b444a0 100644 --- a/db/migrate/20170313213916_add_index_to_user_ghost.rb +++ b/db/migrate/20170313213916_add_index_to_user_ghost.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class AddIndexToUserGhost < ActiveRecord::Migration +class AddIndexToUserGhost < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170314082049_create_system_note_metadata.rb b/db/migrate/20170314082049_create_system_note_metadata.rb index fee47e96053..d0cc6e3be36 100644 --- a/db/migrate/20170314082049_create_system_note_metadata.rb +++ b/db/migrate/20170314082049_create_system_note_metadata.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateSystemNoteMetadata < ActiveRecord::Migration +class CreateSystemNoteMetadata < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170315174634_revert_add_notified_of_own_activity_to_users.rb b/db/migrate/20170315174634_revert_add_notified_of_own_activity_to_users.rb index 6c9fe19ca34..b02e3295a84 100644 --- a/db/migrate/20170315174634_revert_add_notified_of_own_activity_to_users.rb +++ b/db/migrate/20170315174634_revert_add_notified_of_own_activity_to_users.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/AddColumnWithDefaultToLargeTable -class RevertAddNotifiedOfOwnActivityToUsers < ActiveRecord::Migration +class RevertAddNotifiedOfOwnActivityToUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170315194013_add_closed_at_to_issues.rb b/db/migrate/20170315194013_add_closed_at_to_issues.rb index 34a1bd7ca8c..0b06ee6e74c 100644 --- a/db/migrate/20170315194013_add_closed_at_to_issues.rb +++ b/db/migrate/20170315194013_add_closed_at_to_issues.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Datetime -class AddClosedAtToIssues < ActiveRecord::Migration +class AddClosedAtToIssues < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170316061730_readd_notified_of_own_activity_to_users.rb b/db/migrate/20170316061730_readd_notified_of_own_activity_to_users.rb index 524eb2557ce..82029dfd3fc 100644 --- a/db/migrate/20170316061730_readd_notified_of_own_activity_to_users.rb +++ b/db/migrate/20170316061730_readd_notified_of_own_activity_to_users.rb @@ -1,4 +1,4 @@ -class ReaddNotifiedOfOwnActivityToUsers < ActiveRecord::Migration +class ReaddNotifiedOfOwnActivityToUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170316163845_move_uploads_to_system_dir.rb b/db/migrate/20170316163845_move_uploads_to_system_dir.rb index cfcb909ddaf..d24527b55cd 100644 --- a/db/migrate/20170316163845_move_uploads_to_system_dir.rb +++ b/db/migrate/20170316163845_move_uploads_to_system_dir.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MoveUploadsToSystemDir < ActiveRecord::Migration +class MoveUploadsToSystemDir < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170317203554_index_routes_path_for_like.rb b/db/migrate/20170317203554_index_routes_path_for_like.rb index 8d3609135d0..a1bee3c8783 100644 --- a/db/migrate/20170317203554_index_routes_path_for_like.rb +++ b/db/migrate/20170317203554_index_routes_path_for_like.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class IndexRoutesPathForLike < ActiveRecord::Migration +class IndexRoutesPathForLike < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170320173259_migrate_assignees.rb b/db/migrate/20170320173259_migrate_assignees.rb index 7b61e811317..35f21f7cba0 100644 --- a/db/migrate/20170320173259_migrate_assignees.rb +++ b/db/migrate/20170320173259_migrate_assignees.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/UpdateColumnInBatches -class MigrateAssignees < ActiveRecord::Migration +class MigrateAssignees < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170322013926_create_container_repository.rb b/db/migrate/20170322013926_create_container_repository.rb index 242f7b8d17d..b1e778671b2 100644 --- a/db/migrate/20170322013926_create_container_repository.rb +++ b/db/migrate/20170322013926_create_container_repository.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateContainerRepository < ActiveRecord::Migration +class CreateContainerRepository < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170327091750_add_created_at_index_to_deployments.rb b/db/migrate/20170327091750_add_created_at_index_to_deployments.rb index fd6ed499b80..f29fff7d5b9 100644 --- a/db/migrate/20170327091750_add_created_at_index_to_deployments.rb +++ b/db/migrate/20170327091750_add_created_at_index_to_deployments.rb @@ -1,4 +1,4 @@ -class AddCreatedAtIndexToDeployments < ActiveRecord::Migration +class AddCreatedAtIndexToDeployments < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170328010804_add_uuid_to_application_settings.rb b/db/migrate/20170328010804_add_uuid_to_application_settings.rb index 5dfcc751c7b..95a01c2dc8f 100644 --- a/db/migrate/20170328010804_add_uuid_to_application_settings.rb +++ b/db/migrate/20170328010804_add_uuid_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddUuidToApplicationSettings < ActiveRecord::Migration +class AddUuidToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170329095325_add_ref_to_triggers.rb b/db/migrate/20170329095325_add_ref_to_triggers.rb index 4aa52dd8f8f..db09b36db17 100644 --- a/db/migrate/20170329095325_add_ref_to_triggers.rb +++ b/db/migrate/20170329095325_add_ref_to_triggers.rb @@ -1,4 +1,4 @@ -class AddRefToTriggers < ActiveRecord::Migration +class AddRefToTriggers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170329095907_create_ci_trigger_schedules.rb b/db/migrate/20170329095907_create_ci_trigger_schedules.rb index 06a2010db23..08e3b60d92d 100644 --- a/db/migrate/20170329095907_create_ci_trigger_schedules.rb +++ b/db/migrate/20170329095907_create_ci_trigger_schedules.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Datetime -class CreateCiTriggerSchedules < ActiveRecord::Migration +class CreateCiTriggerSchedules < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170329124448_add_polling_interval_multiplier_to_application_settings.rb b/db/migrate/20170329124448_add_polling_interval_multiplier_to_application_settings.rb index a8affd19a0b..17307879a2a 100644 --- a/db/migrate/20170329124448_add_polling_interval_multiplier_to_application_settings.rb +++ b/db/migrate/20170329124448_add_polling_interval_multiplier_to_application_settings.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddPollingIntervalMultiplierToApplicationSettings < ActiveRecord::Migration +class AddPollingIntervalMultiplierToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170330141723_disable_invalid_service_templates2.rb b/db/migrate/20170330141723_disable_invalid_service_templates2.rb index 8424e56d8a1..91ec19dfa87 100644 --- a/db/migrate/20170330141723_disable_invalid_service_templates2.rb +++ b/db/migrate/20170330141723_disable_invalid_service_templates2.rb @@ -1,7 +1,7 @@ # This is the same as DisableInvalidServiceTemplates. Later migrations may have # inadventently enabled some invalid templates again. # -class DisableInvalidServiceTemplates2 < ActiveRecord::Migration +class DisableInvalidServiceTemplates2 < ActiveRecord::Migration[4.2] DOWNTIME = false unless defined?(Service) diff --git a/db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb b/db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb index 84635fa39b9..cb991587a54 100644 --- a/db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb +++ b/db/migrate/20170402231018_remove_index_for_users_current_sign_in_at.rb @@ -2,7 +2,7 @@ # for more information on how to write migrations for GitLab. # rubocop:disable RemoveIndex -class RemoveIndexForUsersCurrentSignInAt < ActiveRecord::Migration +class RemoveIndexForUsersCurrentSignInAt < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170404163427_add_trigger_id_foreign_key.rb b/db/migrate/20170404163427_add_trigger_id_foreign_key.rb index 6679a95ca11..f35730c8e45 100644 --- a/db/migrate/20170404163427_add_trigger_id_foreign_key.rb +++ b/db/migrate/20170404163427_add_trigger_id_foreign_key.rb @@ -1,4 +1,4 @@ -class AddTriggerIdForeignKey < ActiveRecord::Migration +class AddTriggerIdForeignKey < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170405080720_add_import_jid_to_projects.rb b/db/migrate/20170405080720_add_import_jid_to_projects.rb index 55b87b9d56d..ddbea9d7ab6 100644 --- a/db/migrate/20170405080720_add_import_jid_to_projects.rb +++ b/db/migrate/20170405080720_add_import_jid_to_projects.rb @@ -1,4 +1,4 @@ -class AddImportJidToProjects < ActiveRecord::Migration +class AddImportJidToProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170406114958_add_auto_canceled_by_id_to_ci_builds.rb b/db/migrate/20170406114958_add_auto_canceled_by_id_to_ci_builds.rb index c1d803b4308..ba43a070587 100644 --- a/db/migrate/20170406114958_add_auto_canceled_by_id_to_ci_builds.rb +++ b/db/migrate/20170406114958_add_auto_canceled_by_id_to_ci_builds.rb @@ -1,4 +1,4 @@ -class AddAutoCanceledByIdToCiBuilds < ActiveRecord::Migration +class AddAutoCanceledByIdToCiBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170406115029_add_auto_canceled_by_id_foreign_key_to_ci_builds.rb b/db/migrate/20170406115029_add_auto_canceled_by_id_foreign_key_to_ci_builds.rb index 3004683933b..2ec281e20c1 100644 --- a/db/migrate/20170406115029_add_auto_canceled_by_id_foreign_key_to_ci_builds.rb +++ b/db/migrate/20170406115029_add_auto_canceled_by_id_foreign_key_to_ci_builds.rb @@ -1,4 +1,4 @@ -class AddAutoCanceledByIdForeignKeyToCiBuilds < ActiveRecord::Migration +class AddAutoCanceledByIdForeignKeyToCiBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb b/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb index 523a306f127..5d156b7ef2e 100644 --- a/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb +++ b/db/migrate/20170407114956_add_ref_to_ci_trigger_schedule.rb @@ -1,4 +1,4 @@ -class AddRefToCiTriggerSchedule < ActiveRecord::Migration +class AddRefToCiTriggerSchedule < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb b/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb index 36892118ac0..33295bd3f2e 100644 --- a/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb +++ b/db/migrate/20170407122426_add_active_to_ci_trigger_schedule.rb @@ -1,4 +1,4 @@ -class AddActiveToCiTriggerSchedule < ActiveRecord::Migration +class AddActiveToCiTriggerSchedule < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170407135259_add_foreigh_key_trigger_requests_trigger.rb b/db/migrate/20170407135259_add_foreigh_key_trigger_requests_trigger.rb index 81761c65a9f..9aaa4d0eddf 100644 --- a/db/migrate/20170407135259_add_foreigh_key_trigger_requests_trigger.rb +++ b/db/migrate/20170407135259_add_foreigh_key_trigger_requests_trigger.rb @@ -1,4 +1,4 @@ -class AddForeighKeyTriggerRequestsTrigger < ActiveRecord::Migration +class AddForeighKeyTriggerRequestsTrigger < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb b/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb index 626c2a67fdc..0bde4f69b3b 100644 --- a/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb +++ b/db/migrate/20170407140450_add_index_to_next_run_at_and_active.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddIndexToNextRunAtAndActive < ActiveRecord::Migration +class AddIndexToNextRunAtAndActive < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170410133135_add_version_field_to_markdown_cache.rb b/db/migrate/20170410133135_add_version_field_to_markdown_cache.rb index d9209fe5770..c019e0627d3 100644 --- a/db/migrate/20170410133135_add_version_field_to_markdown_cache.rb +++ b/db/migrate/20170410133135_add_version_field_to_markdown_cache.rb @@ -1,4 +1,4 @@ -class AddVersionFieldToMarkdownCache < ActiveRecord::Migration +class AddVersionFieldToMarkdownCache < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170413035209_add_preferred_language_to_users.rb b/db/migrate/20170413035209_add_preferred_language_to_users.rb index 92f1d6f2436..5b5f00ea60f 100644 --- a/db/migrate/20170413035209_add_preferred_language_to_users.rb +++ b/db/migrate/20170413035209_add_preferred_language_to_users.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddPreferredLanguageToUsers < ActiveRecord::Migration +class AddPreferredLanguageToUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170418103908_delete_orphan_notification_settings.rb b/db/migrate/20170418103908_delete_orphan_notification_settings.rb index e4b9cf65936..c99729b9127 100644 --- a/db/migrate/20170418103908_delete_orphan_notification_settings.rb +++ b/db/migrate/20170418103908_delete_orphan_notification_settings.rb @@ -1,4 +1,4 @@ -class DeleteOrphanNotificationSettings < ActiveRecord::Migration +class DeleteOrphanNotificationSettings < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20170419001229_add_index_to_system_note_metadata.rb b/db/migrate/20170419001229_add_index_to_system_note_metadata.rb index c68fd920fff..59cd55395fc 100644 --- a/db/migrate/20170419001229_add_index_to_system_note_metadata.rb +++ b/db/migrate/20170419001229_add_index_to_system_note_metadata.rb @@ -1,4 +1,4 @@ -class AddIndexToSystemNoteMetadata < ActiveRecord::Migration +class AddIndexToSystemNoteMetadata < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170421102337_remove_nil_type_services.rb b/db/migrate/20170421102337_remove_nil_type_services.rb index b835b9c6ed9..561eddf69e0 100644 --- a/db/migrate/20170421102337_remove_nil_type_services.rb +++ b/db/migrate/20170421102337_remove_nil_type_services.rb @@ -1,4 +1,4 @@ -class RemoveNilTypeServices < ActiveRecord::Migration +class RemoveNilTypeServices < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20170423064036_add_index_on_ci_builds_updated_at.rb b/db/migrate/20170423064036_add_index_on_ci_builds_updated_at.rb index 0bbb74ee05e..76252378c2e 100644 --- a/db/migrate/20170423064036_add_index_on_ci_builds_updated_at.rb +++ b/db/migrate/20170423064036_add_index_on_ci_builds_updated_at.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddIndexOnCiBuildsUpdatedAt < ActiveRecord::Migration +class AddIndexOnCiBuildsUpdatedAt < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb b/db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb index 348d5dbc270..ab2501da941 100644 --- a/db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb +++ b/db/migrate/20170424095707_add_index_on_ci_builds_user_id.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddIndexOnCiBuildsUserId < ActiveRecord::Migration +class AddIndexOnCiBuildsUserId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170424142900_add_index_to_web_hooks_type.rb b/db/migrate/20170424142900_add_index_to_web_hooks_type.rb index 9af158e3844..1c56c1ed65a 100644 --- a/db/migrate/20170424142900_add_index_to_web_hooks_type.rb +++ b/db/migrate/20170424142900_add_index_to_web_hooks_type.rb @@ -1,4 +1,4 @@ -class AddIndexToWebHooksType < ActiveRecord::Migration +class AddIndexToWebHooksType < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170425112128_create_pipeline_schedules_table.rb b/db/migrate/20170425112128_create_pipeline_schedules_table.rb index 57df47f5f42..8a82dbd0b45 100644 --- a/db/migrate/20170425112128_create_pipeline_schedules_table.rb +++ b/db/migrate/20170425112128_create_pipeline_schedules_table.rb @@ -1,6 +1,6 @@ # rubocop:disable Migration/Datetime # rubocop:disable Migration/Timestamps -class CreatePipelineSchedulesTable < ActiveRecord::Migration +class CreatePipelineSchedulesTable < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170425112628_remove_foreigh_key_ci_trigger_schedules.rb b/db/migrate/20170425112628_remove_foreigh_key_ci_trigger_schedules.rb index 1587eee06ae..d89c4c61cbe 100644 --- a/db/migrate/20170425112628_remove_foreigh_key_ci_trigger_schedules.rb +++ b/db/migrate/20170425112628_remove_foreigh_key_ci_trigger_schedules.rb @@ -1,4 +1,4 @@ -class RemoveForeighKeyCiTriggerSchedules < ActiveRecord::Migration +class RemoveForeighKeyCiTriggerSchedules < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170425114731_add_pipeline_schedule_id_to_pipelines.rb b/db/migrate/20170425114731_add_pipeline_schedule_id_to_pipelines.rb index ddb27d4dc81..da16d89febc 100644 --- a/db/migrate/20170425114731_add_pipeline_schedule_id_to_pipelines.rb +++ b/db/migrate/20170425114731_add_pipeline_schedule_id_to_pipelines.rb @@ -1,4 +1,4 @@ -class AddPipelineScheduleIdToPipelines < ActiveRecord::Migration +class AddPipelineScheduleIdToPipelines < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb b/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb index 58ad2c64075..eeeb216f32c 100644 --- a/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb +++ b/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb @@ -1,4 +1,4 @@ -class FillMissingUuidOnApplicationSettings < ActiveRecord::Migration +class FillMissingUuidOnApplicationSettings < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb b/db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb index 879825a1934..e14b2eb4c8a 100644 --- a/db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb +++ b/db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddIndexOnCiRunnersContactedAt < ActiveRecord::Migration +class AddIndexOnCiRunnersContactedAt < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170427103502_create_web_hook_logs.rb b/db/migrate/20170427103502_create_web_hook_logs.rb index 3643c52180c..a7a061e7bae 100644 --- a/db/migrate/20170427103502_create_web_hook_logs.rb +++ b/db/migrate/20170427103502_create_web_hook_logs.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class CreateWebHookLogs < ActiveRecord::Migration +class CreateWebHookLogs < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170427215854_create_redirect_routes.rb b/db/migrate/20170427215854_create_redirect_routes.rb index 6db508e5db4..069c9b39d37 100644 --- a/db/migrate/20170427215854_create_redirect_routes.rb +++ b/db/migrate/20170427215854_create_redirect_routes.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateRedirectRoutes < ActiveRecord::Migration +class CreateRedirectRoutes < ActiveRecord::Migration[4.2] # Set this constant to true if this migration requires downtime. DOWNTIME = false diff --git a/db/migrate/20170428064307_add_column_delete_error_to_projects.rb b/db/migrate/20170428064307_add_column_delete_error_to_projects.rb index 09f9d9b5b7a..bef0373309c 100644 --- a/db/migrate/20170428064307_add_column_delete_error_to_projects.rb +++ b/db/migrate/20170428064307_add_column_delete_error_to_projects.rb @@ -1,4 +1,4 @@ -class AddColumnDeleteErrorToProjects < ActiveRecord::Migration +class AddColumnDeleteErrorToProjects < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb b/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb index 03bf626a08a..e51a790de4d 100644 --- a/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb +++ b/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb @@ -1,4 +1,4 @@ -class MakeAutoCancelPendingPipelinesOnByDefault < ActiveRecord::Migration +class MakeAutoCancelPendingPipelinesOnByDefault < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170502135553_create_index_ci_pipelines_auto_canceled_by_id.rb b/db/migrate/20170502135553_create_index_ci_pipelines_auto_canceled_by_id.rb index b64d7e0e3f6..7acae645c7b 100644 --- a/db/migrate/20170502135553_create_index_ci_pipelines_auto_canceled_by_id.rb +++ b/db/migrate/20170502135553_create_index_ci_pipelines_auto_canceled_by_id.rb @@ -1,4 +1,4 @@ -class CreateIndexCiPipelinesAutoCanceledById < ActiveRecord::Migration +class CreateIndexCiPipelinesAutoCanceledById < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170502140503_create_index_ci_builds_auto_canceled_by_id.rb b/db/migrate/20170502140503_create_index_ci_builds_auto_canceled_by_id.rb index 0a8d2c8ff61..f5148f6fdb8 100644 --- a/db/migrate/20170502140503_create_index_ci_builds_auto_canceled_by_id.rb +++ b/db/migrate/20170502140503_create_index_ci_builds_auto_canceled_by_id.rb @@ -1,4 +1,4 @@ -class CreateIndexCiBuildsAutoCanceledById < ActiveRecord::Migration +class CreateIndexCiBuildsAutoCanceledById < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb b/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb index 2ea49f62742..303250ff3b0 100644 --- a/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb +++ b/db/migrate/20170503004125_add_last_repository_updated_at_to_projects.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Datetime -class AddLastRepositoryUpdatedAtToProjects < ActiveRecord::Migration +class AddLastRepositoryUpdatedAtToProjects < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb b/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb index 6144d74745c..ae54cfb39f5 100644 --- a/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb +++ b/db/migrate/20170503004425_add_index_to_last_repository_updated_at_on_projects.rb @@ -1,4 +1,4 @@ -class AddIndexToLastRepositoryUpdatedAtOnProjects < ActiveRecord::Migration +class AddIndexToLastRepositoryUpdatedAtOnProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170503004426_add_retried_to_ci_build.rb b/db/migrate/20170503004426_add_retried_to_ci_build.rb index 2851e3de473..ff2e0ba64c5 100644 --- a/db/migrate/20170503004426_add_retried_to_ci_build.rb +++ b/db/migrate/20170503004426_add_retried_to_ci_build.rb @@ -1,4 +1,4 @@ -class AddRetriedToCiBuild < ActiveRecord::Migration +class AddRetriedToCiBuild < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170503021915_add_last_edited_at_and_last_edited_by_id_to_issues.rb b/db/migrate/20170503021915_add_last_edited_at_and_last_edited_by_id_to_issues.rb index 6ac10723c82..4f6b2343459 100644 --- a/db/migrate/20170503021915_add_last_edited_at_and_last_edited_by_id_to_issues.rb +++ b/db/migrate/20170503021915_add_last_edited_at_and_last_edited_by_id_to_issues.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddLastEditedAtAndLastEditedByIdToIssues < ActiveRecord::Migration +class AddLastEditedAtAndLastEditedByIdToIssues < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170503022548_add_last_edited_at_and_last_edited_by_id_to_merge_requests.rb b/db/migrate/20170503022548_add_last_edited_at_and_last_edited_by_id_to_merge_requests.rb index 7a1acdcbf69..f8585b15568 100644 --- a/db/migrate/20170503022548_add_last_edited_at_and_last_edited_by_id_to_merge_requests.rb +++ b/db/migrate/20170503022548_add_last_edited_at_and_last_edited_by_id_to_merge_requests.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddLastEditedAtAndLastEditedByIdToMergeRequests < ActiveRecord::Migration +class AddLastEditedAtAndLastEditedByIdToMergeRequests < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170503023315_add_repository_update_events_to_web_hooks.rb b/db/migrate/20170503023315_add_repository_update_events_to_web_hooks.rb index 0faea87a962..4824c404ec7 100644 --- a/db/migrate/20170503023315_add_repository_update_events_to_web_hooks.rb +++ b/db/migrate/20170503023315_add_repository_update_events_to_web_hooks.rb @@ -1,4 +1,4 @@ -class AddRepositoryUpdateEventsToWebHooks < ActiveRecord::Migration +class AddRepositoryUpdateEventsToWebHooks < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170503114228_add_description_to_snippets.rb b/db/migrate/20170503114228_add_description_to_snippets.rb index 3fc960b2da5..78151ed9ff6 100644 --- a/db/migrate/20170503114228_add_description_to_snippets.rb +++ b/db/migrate/20170503114228_add_description_to_snippets.rb @@ -1,4 +1,4 @@ -class AddDescriptionToSnippets < ActiveRecord::Migration +class AddDescriptionToSnippets < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170503140201_reschedule_project_authorizations.rb b/db/migrate/20170503140201_reschedule_project_authorizations.rb index fa45adadbae..aa940bed2d3 100644 --- a/db/migrate/20170503140201_reschedule_project_authorizations.rb +++ b/db/migrate/20170503140201_reschedule_project_authorizations.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RescheduleProjectAuthorizations < ActiveRecord::Migration +class RescheduleProjectAuthorizations < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb b/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb index 33908ae1156..cfa63b65df4 100644 --- a/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb +++ b/db/migrate/20170503140202_turn_nested_groups_into_regular_groups_for_mysql.rb @@ -5,7 +5,7 @@ # updating a namespace to also rename directories (uploads, GitLab pages, etc). # The alternative is to copy hundreds of lines of code into this migration, # adjust them where needed, etc; something which doesn't work well at all. -class TurnNestedGroupsIntoRegularGroupsForMysql < ActiveRecord::Migration +class TurnNestedGroupsIntoRegularGroupsForMysql < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170503184421_add_index_to_redirect_routes.rb b/db/migrate/20170503184421_add_index_to_redirect_routes.rb index 9062cf19a73..6320d4bbc99 100644 --- a/db/migrate/20170503184421_add_index_to_redirect_routes.rb +++ b/db/migrate/20170503184421_add_index_to_redirect_routes.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddIndexToRedirectRoutes < ActiveRecord::Migration +class AddIndexToRedirectRoutes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170503185032_index_redirect_routes_path_for_like.rb b/db/migrate/20170503185032_index_redirect_routes_path_for_like.rb index 8eb20faa03a..5d06fd0511c 100644 --- a/db/migrate/20170503185032_index_redirect_routes_path_for_like.rb +++ b/db/migrate/20170503185032_index_redirect_routes_path_for_like.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class IndexRedirectRoutesPathForLike < ActiveRecord::Migration +class IndexRedirectRoutesPathForLike < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170504102911_add_clientside_sentry_to_application_settings.rb b/db/migrate/20170504102911_add_clientside_sentry_to_application_settings.rb index 141112f8b50..4659f694020 100644 --- a/db/migrate/20170504102911_add_clientside_sentry_to_application_settings.rb +++ b/db/migrate/20170504102911_add_clientside_sentry_to_application_settings.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddClientsideSentryToApplicationSettings < ActiveRecord::Migration +class AddClientsideSentryToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170504182103_add_index_project_group_links_group_id.rb b/db/migrate/20170504182103_add_index_project_group_links_group_id.rb index 62bf641daa6..5b1c14e66dd 100644 --- a/db/migrate/20170504182103_add_index_project_group_links_group_id.rb +++ b/db/migrate/20170504182103_add_index_project_group_links_group_id.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddIndexProjectGroupLinksGroupId < ActiveRecord::Migration +class AddIndexProjectGroupLinksGroupId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170506085040_add_index_to_pipeline_pipeline_schedule_id.rb b/db/migrate/20170506085040_add_index_to_pipeline_pipeline_schedule_id.rb index 08a7f3fc9ab..9d8cc8a83a2 100644 --- a/db/migrate/20170506085040_add_index_to_pipeline_pipeline_schedule_id.rb +++ b/db/migrate/20170506085040_add_index_to_pipeline_pipeline_schedule_id.rb @@ -1,4 +1,4 @@ -class AddIndexToPipelinePipelineScheduleId < ActiveRecord::Migration +class AddIndexToPipelinePipelineScheduleId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170506091344_add_foreign_key_to_pipeline_schedules.rb b/db/migrate/20170506091344_add_foreign_key_to_pipeline_schedules.rb index 7f2dba702af..244e41e2f07 100644 --- a/db/migrate/20170506091344_add_foreign_key_to_pipeline_schedules.rb +++ b/db/migrate/20170506091344_add_foreign_key_to_pipeline_schedules.rb @@ -1,4 +1,4 @@ -class AddForeignKeyToPipelineSchedules < ActiveRecord::Migration +class AddForeignKeyToPipelineSchedules < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170506185517_add_foreign_key_pipeline_schedules_and_pipelines.rb b/db/migrate/20170506185517_add_foreign_key_pipeline_schedules_and_pipelines.rb index 55bf40ba24d..6b0a7a0de27 100644 --- a/db/migrate/20170506185517_add_foreign_key_pipeline_schedules_and_pipelines.rb +++ b/db/migrate/20170506185517_add_foreign_key_pipeline_schedules_and_pipelines.rb @@ -1,4 +1,4 @@ -class AddForeignKeyPipelineSchedulesAndPipelines < ActiveRecord::Migration +class AddForeignKeyPipelineSchedulesAndPipelines < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170507205316_add_head_pipeline_id_to_merge_requests.rb b/db/migrate/20170507205316_add_head_pipeline_id_to_merge_requests.rb index 8fc6e380a77..adfe6559084 100644 --- a/db/migrate/20170507205316_add_head_pipeline_id_to_merge_requests.rb +++ b/db/migrate/20170507205316_add_head_pipeline_id_to_merge_requests.rb @@ -1,4 +1,4 @@ -class AddHeadPipelineIdToMergeRequests < ActiveRecord::Migration +class AddHeadPipelineIdToMergeRequests < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170508153950_add_not_null_contraints_to_ci_variables.rb b/db/migrate/20170508153950_add_not_null_contraints_to_ci_variables.rb index 41c687a4f6e..2a0c7132bfd 100644 --- a/db/migrate/20170508153950_add_not_null_contraints_to_ci_variables.rb +++ b/db/migrate/20170508153950_add_not_null_contraints_to_ci_variables.rb @@ -1,4 +1,4 @@ -class AddNotNullContraintsToCiVariables < ActiveRecord::Migration +class AddNotNullContraintsToCiVariables < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20170508190732_add_foreign_key_to_ci_variables.rb b/db/migrate/20170508190732_add_foreign_key_to_ci_variables.rb index 20ecaa2c36c..305366b2171 100644 --- a/db/migrate/20170508190732_add_foreign_key_to_ci_variables.rb +++ b/db/migrate/20170508190732_add_foreign_key_to_ci_variables.rb @@ -1,4 +1,4 @@ -class AddForeignKeyToCiVariables < ActiveRecord::Migration +class AddForeignKeyToCiVariables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170511082759_rename_web_hooks_build_events_to_job_events.rb b/db/migrate/20170511082759_rename_web_hooks_build_events_to_job_events.rb index a2320a911b7..3a44057d948 100644 --- a/db/migrate/20170511082759_rename_web_hooks_build_events_to_job_events.rb +++ b/db/migrate/20170511082759_rename_web_hooks_build_events_to_job_events.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RenameWebHooksBuildEventsToJobEvents < ActiveRecord::Migration +class RenameWebHooksBuildEventsToJobEvents < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170511083824_rename_services_build_events_to_job_events.rb b/db/migrate/20170511083824_rename_services_build_events_to_job_events.rb index 303d47078e7..713adde76ef 100644 --- a/db/migrate/20170511083824_rename_services_build_events_to_job_events.rb +++ b/db/migrate/20170511083824_rename_services_build_events_to_job_events.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RenameServicesBuildEventsToJobEvents < ActiveRecord::Migration +class RenameServicesBuildEventsToJobEvents < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb b/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb index eed9f00d8b2..0ed45775421 100644 --- a/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb +++ b/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MigrateAssigneeToSeparateTable < ActiveRecord::Migration +class MigrateAssigneeToSeparateTable < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170516183131_add_indices_to_issue_assignees.rb b/db/migrate/20170516183131_add_indices_to_issue_assignees.rb index a1f064c6848..6877fe9ff98 100644 --- a/db/migrate/20170516183131_add_indices_to_issue_assignees.rb +++ b/db/migrate/20170516183131_add_indices_to_issue_assignees.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddIndicesToIssueAssignees < ActiveRecord::Migration +class AddIndicesToIssueAssignees < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb b/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb index 6ec2ed712b9..9c8f58104bd 100644 --- a/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb +++ b/db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb @@ -1,4 +1,4 @@ -class AddPrometheusSettingsToMetricsSettings < ActiveRecord::Migration +class AddPrometheusSettingsToMetricsSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170521184006_add_change_position_to_notes.rb b/db/migrate/20170521184006_add_change_position_to_notes.rb index 219ed1ade4c..f0ca3a2a9ea 100644 --- a/db/migrate/20170521184006_add_change_position_to_notes.rb +++ b/db/migrate/20170521184006_add_change_position_to_notes.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddChangePositionToNotes < ActiveRecord::Migration +class AddChangePositionToNotes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170523091700_add_rss_token_to_users.rb b/db/migrate/20170523091700_add_rss_token_to_users.rb index 06a85f6ac3d..e1bcd9b3fee 100644 --- a/db/migrate/20170523091700_add_rss_token_to_users.rb +++ b/db/migrate/20170523091700_add_rss_token_to_users.rb @@ -1,4 +1,4 @@ -class AddRssTokenToUsers < ActiveRecord::Migration +class AddRssTokenToUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170523121229_create_conversational_development_index_metrics.rb b/db/migrate/20170523121229_create_conversational_development_index_metrics.rb index 7026a867ae1..5f8c0d07e3c 100644 --- a/db/migrate/20170523121229_create_conversational_development_index_metrics.rb +++ b/db/migrate/20170523121229_create_conversational_development_index_metrics.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreateConversationalDevelopmentIndexMetrics < ActiveRecord::Migration +class CreateConversationalDevelopmentIndexMetrics < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170524125940_add_source_to_ci_pipeline.rb b/db/migrate/20170524125940_add_source_to_ci_pipeline.rb index 1fa3d48037b..81358e7ce3d 100644 --- a/db/migrate/20170524125940_add_source_to_ci_pipeline.rb +++ b/db/migrate/20170524125940_add_source_to_ci_pipeline.rb @@ -1,4 +1,4 @@ -class AddSourceToCiPipeline < ActiveRecord::Migration +class AddSourceToCiPipeline < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170524161101_add_protected_to_ci_variables.rb b/db/migrate/20170524161101_add_protected_to_ci_variables.rb index 99d4861e889..6125ea5d5a8 100644 --- a/db/migrate/20170524161101_add_protected_to_ci_variables.rb +++ b/db/migrate/20170524161101_add_protected_to_ci_variables.rb @@ -1,4 +1,4 @@ -class AddProtectedToCiVariables < ActiveRecord::Migration +class AddProtectedToCiVariables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170525130346_create_group_variables_table.rb b/db/migrate/20170525130346_create_group_variables_table.rb index eaa38dbc40d..6eae7eff7bd 100644 --- a/db/migrate/20170525130346_create_group_variables_table.rb +++ b/db/migrate/20170525130346_create_group_variables_table.rb @@ -1,4 +1,4 @@ -class CreateGroupVariablesTable < ActiveRecord::Migration +class CreateGroupVariablesTable < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20170525130758_add_foreign_key_to_group_variables.rb b/db/migrate/20170525130758_add_foreign_key_to_group_variables.rb index 0146235c5ba..f1f51a1dda3 100644 --- a/db/migrate/20170525130758_add_foreign_key_to_group_variables.rb +++ b/db/migrate/20170525130758_add_foreign_key_to_group_variables.rb @@ -1,4 +1,4 @@ -class AddForeignKeyToGroupVariables < ActiveRecord::Migration +class AddForeignKeyToGroupVariables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170525132202_create_pipeline_stages.rb b/db/migrate/20170525132202_create_pipeline_stages.rb index 825993aa41e..0a6400fde90 100644 --- a/db/migrate/20170525132202_create_pipeline_stages.rb +++ b/db/migrate/20170525132202_create_pipeline_stages.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Timestamps -class CreatePipelineStages < ActiveRecord::Migration +class CreatePipelineStages < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170525174156_create_feature_tables.rb b/db/migrate/20170525174156_create_feature_tables.rb index a083c89c85f..e1eaaff8d35 100644 --- a/db/migrate/20170525174156_create_feature_tables.rb +++ b/db/migrate/20170525174156_create_feature_tables.rb @@ -1,4 +1,4 @@ -class CreateFeatureTables < ActiveRecord::Migration +class CreateFeatureTables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170526185602_add_stage_id_to_ci_builds.rb b/db/migrate/20170526185602_add_stage_id_to_ci_builds.rb index d27cba76d81..6958557d118 100644 --- a/db/migrate/20170526185602_add_stage_id_to_ci_builds.rb +++ b/db/migrate/20170526185602_add_stage_id_to_ci_builds.rb @@ -1,4 +1,4 @@ -class AddStageIdToCiBuilds < ActiveRecord::Migration +class AddStageIdToCiBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb b/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb index af6d10b5158..356319f9bf0 100644 --- a/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb +++ b/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class ProjectForeignKeysWithCascadingDeletes < ActiveRecord::Migration +class ProjectForeignKeysWithCascadingDeletes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb b/db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb index 470c3b8166c..2bcfefb0cdc 100644 --- a/db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb +++ b/db/migrate/20170531202042_rename_users_ldap_email_to_external_email.rb @@ -1,4 +1,4 @@ -class RenameUsersLdapEmailToExternalEmail < ActiveRecord::Migration +class RenameUsersLdapEmailToExternalEmail < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170602154736_add_help_page_hide_commercial_content_to_application_settings.rb b/db/migrate/20170602154736_add_help_page_hide_commercial_content_to_application_settings.rb index d358020d182..ff9e188d7a8 100644 --- a/db/migrate/20170602154736_add_help_page_hide_commercial_content_to_application_settings.rb +++ b/db/migrate/20170602154736_add_help_page_hide_commercial_content_to_application_settings.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/SaferBooleanColumn -class AddHelpPageHideCommercialContentToApplicationSettings < ActiveRecord::Migration +class AddHelpPageHideCommercialContentToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170602154813_add_help_page_support_url_to_application_settings.rb b/db/migrate/20170602154813_add_help_page_support_url_to_application_settings.rb index 138fe9b2a37..388e130ab88 100644 --- a/db/migrate/20170602154813_add_help_page_support_url_to_application_settings.rb +++ b/db/migrate/20170602154813_add_help_page_support_url_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddHelpPageSupportUrlToApplicationSettings < ActiveRecord::Migration +class AddHelpPageSupportUrlToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170603200744_add_email_provider_to_users.rb b/db/migrate/20170603200744_add_email_provider_to_users.rb index ed90af9aadc..ad6e813d31b 100644 --- a/db/migrate/20170603200744_add_email_provider_to_users.rb +++ b/db/migrate/20170603200744_add_email_provider_to_users.rb @@ -1,4 +1,4 @@ -class AddEmailProviderToUsers < ActiveRecord::Migration +class AddEmailProviderToUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170606154216_add_notification_setting_columns.rb b/db/migrate/20170606154216_add_notification_setting_columns.rb index 0a9b5da6583..3b9493e6b49 100644 --- a/db/migrate/20170606154216_add_notification_setting_columns.rb +++ b/db/migrate/20170606154216_add_notification_setting_columns.rb @@ -1,4 +1,4 @@ -class AddNotificationSettingColumns < ActiveRecord::Migration +class AddNotificationSettingColumns < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170608152747_prepare_events_table_for_push_events_migration.rb b/db/migrate/20170608152747_prepare_events_table_for_push_events_migration.rb index f4f03bbabaf..851af7f7bf6 100644 --- a/db/migrate/20170608152747_prepare_events_table_for_push_events_migration.rb +++ b/db/migrate/20170608152747_prepare_events_table_for_push_events_migration.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class PrepareEventsTableForPushEventsMigration < ActiveRecord::Migration +class PrepareEventsTableForPushEventsMigration < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170608152748_create_push_event_payloads_tables.rb b/db/migrate/20170608152748_create_push_event_payloads_tables.rb index 6c55ad1f2f7..292d9e3ca06 100644 --- a/db/migrate/20170608152748_create_push_event_payloads_tables.rb +++ b/db/migrate/20170608152748_create_push_event_payloads_tables.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class CreatePushEventPayloadsTables < ActiveRecord::Migration +class CreatePushEventPayloadsTables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170608171156_create_merge_request_diff_files.rb b/db/migrate/20170608171156_create_merge_request_diff_files.rb index bf0c0d29adc..94b518455ee 100644 --- a/db/migrate/20170608171156_create_merge_request_diff_files.rb +++ b/db/migrate/20170608171156_create_merge_request_diff_files.rb @@ -1,4 +1,4 @@ -class CreateMergeRequestDiffFiles < ActiveRecord::Migration +class CreateMergeRequestDiffFiles < ActiveRecord::Migration[4.2] DOWNTIME = false disable_ddl_transaction! diff --git a/db/migrate/20170613154149_create_gpg_signatures.rb b/db/migrate/20170613154149_create_gpg_signatures.rb index f6b5e7ebb7b..9edbbd47519 100644 --- a/db/migrate/20170613154149_create_gpg_signatures.rb +++ b/db/migrate/20170613154149_create_gpg_signatures.rb @@ -1,4 +1,4 @@ -class CreateGpgSignatures < ActiveRecord::Migration +class CreateGpgSignatures < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170616133147_create_merge_request_diff_commits.rb b/db/migrate/20170616133147_create_merge_request_diff_commits.rb index 616464cb470..5e148affba2 100644 --- a/db/migrate/20170616133147_create_merge_request_diff_commits.rb +++ b/db/migrate/20170616133147_create_merge_request_diff_commits.rb @@ -1,4 +1,4 @@ -class CreateMergeRequestDiffCommits < ActiveRecord::Migration +class CreateMergeRequestDiffCommits < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb b/db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb index 02863bee082..f97c8a14b8d 100644 --- a/db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb +++ b/db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb @@ -1,4 +1,4 @@ -class AddIndexForHeadPipelineMergeRequest < ActiveRecord::Migration +class AddIndexForHeadPipelineMergeRequest < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170620064728_create_ci_pipeline_schedule_variables.rb b/db/migrate/20170620064728_create_ci_pipeline_schedule_variables.rb index 92833765a82..74f3603505b 100644 --- a/db/migrate/20170620064728_create_ci_pipeline_schedule_variables.rb +++ b/db/migrate/20170620064728_create_ci_pipeline_schedule_variables.rb @@ -1,4 +1,4 @@ -class CreateCiPipelineScheduleVariables < ActiveRecord::Migration +class CreateCiPipelineScheduleVariables < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb b/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb index 7bbf66e0ac3..f6de19aeaf2 100644 --- a/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb +++ b/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb @@ -1,4 +1,4 @@ -class AddForeignKeyToCiPipelineScheduleVariables < ActiveRecord::Migration +class AddForeignKeyToCiPipelineScheduleVariables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170622130029_correct_protected_branches_foreign_keys.rb b/db/migrate/20170622130029_correct_protected_branches_foreign_keys.rb index 46497775527..c4ba3ec2cc0 100644 --- a/db/migrate/20170622130029_correct_protected_branches_foreign_keys.rb +++ b/db/migrate/20170622130029_correct_protected_branches_foreign_keys.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class CorrectProtectedBranchesForeignKeys < ActiveRecord::Migration +class CorrectProtectedBranchesForeignKeys < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170622132212_add_foreign_key_for_merge_request_diffs.rb b/db/migrate/20170622132212_add_foreign_key_for_merge_request_diffs.rb index 9f524fac8a7..b826f67ff39 100644 --- a/db/migrate/20170622132212_add_foreign_key_for_merge_request_diffs.rb +++ b/db/migrate/20170622132212_add_foreign_key_for_merge_request_diffs.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddForeignKeyForMergeRequestDiffs < ActiveRecord::Migration +class AddForeignKeyForMergeRequestDiffs < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170622135451_rename_duplicated_variable_key.rb b/db/migrate/20170622135451_rename_duplicated_variable_key.rb index 368718ab0ce..06a9529ae79 100644 --- a/db/migrate/20170622135451_rename_duplicated_variable_key.rb +++ b/db/migrate/20170622135451_rename_duplicated_variable_key.rb @@ -1,4 +1,4 @@ -class RenameDuplicatedVariableKey < ActiveRecord::Migration +class RenameDuplicatedVariableKey < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170622135628_add_environment_scope_to_ci_variables.rb b/db/migrate/20170622135628_add_environment_scope_to_ci_variables.rb index 17fe062d8d5..8fbb2ab57d5 100644 --- a/db/migrate/20170622135628_add_environment_scope_to_ci_variables.rb +++ b/db/migrate/20170622135628_add_environment_scope_to_ci_variables.rb @@ -1,4 +1,4 @@ -class AddEnvironmentScopeToCiVariables < ActiveRecord::Migration +class AddEnvironmentScopeToCiVariables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb b/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb index 787022b7bfe..240f55766d3 100644 --- a/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb +++ b/db/migrate/20170622135728_add_unique_constraint_to_ci_variables.rb @@ -1,4 +1,4 @@ -class AddUniqueConstraintToCiVariables < ActiveRecord::Migration +class AddUniqueConstraintToCiVariables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170622162730_add_ref_fetched_to_merge_request.rb b/db/migrate/20170622162730_add_ref_fetched_to_merge_request.rb index 62aa1a4b4f0..4715ff7a715 100644 --- a/db/migrate/20170622162730_add_ref_fetched_to_merge_request.rb +++ b/db/migrate/20170622162730_add_ref_fetched_to_merge_request.rb @@ -1,4 +1,4 @@ -class AddRefFetchedToMergeRequest < ActiveRecord::Migration +class AddRefFetchedToMergeRequest < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170623080805_remove_ci_variables_project_id_index.rb b/db/migrate/20170623080805_remove_ci_variables_project_id_index.rb index ddcc0292b9d..861dbd2ee14 100644 --- a/db/migrate/20170623080805_remove_ci_variables_project_id_index.rb +++ b/db/migrate/20170623080805_remove_ci_variables_project_id_index.rb @@ -1,4 +1,4 @@ -class RemoveCiVariablesProjectIdIndex < ActiveRecord::Migration +class RemoveCiVariablesProjectIdIndex < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170629171610_rename_application_settings_signin_enabled_to_password_authentication_enabled.rb b/db/migrate/20170629171610_rename_application_settings_signin_enabled_to_password_authentication_enabled.rb index 858b3bebace..1651a47ebec 100644 --- a/db/migrate/20170629171610_rename_application_settings_signin_enabled_to_password_authentication_enabled.rb +++ b/db/migrate/20170629171610_rename_application_settings_signin_enabled_to_password_authentication_enabled.rb @@ -1,4 +1,4 @@ -class RenameApplicationSettingsSigninEnabledToPasswordAuthenticationEnabled < ActiveRecord::Migration +class RenameApplicationSettingsSigninEnabledToPasswordAuthenticationEnabled < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170703102400_add_stage_id_foreign_key_to_builds.rb b/db/migrate/20170703102400_add_stage_id_foreign_key_to_builds.rb index 68b947583d3..f27036af525 100644 --- a/db/migrate/20170703102400_add_stage_id_foreign_key_to_builds.rb +++ b/db/migrate/20170703102400_add_stage_id_foreign_key_to_builds.rb @@ -1,4 +1,4 @@ -class AddStageIdForeignKeyToBuilds < ActiveRecord::Migration +class AddStageIdForeignKeyToBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170706151212_add_performance_bar_allowed_group_id_to_application_settings.rb b/db/migrate/20170706151212_add_performance_bar_allowed_group_id_to_application_settings.rb index fe9970ddc71..61416f74b63 100644 --- a/db/migrate/20170706151212_add_performance_bar_allowed_group_id_to_application_settings.rb +++ b/db/migrate/20170706151212_add_performance_bar_allowed_group_id_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddPerformanceBarAllowedGroupIdToApplicationSettings < ActiveRecord::Migration +class AddPerformanceBarAllowedGroupIdToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170707183807_add_group_id_to_milestones.rb b/db/migrate/20170707183807_add_group_id_to_milestones.rb index 4aa22e72e20..eb742521272 100644 --- a/db/migrate/20170707183807_add_group_id_to_milestones.rb +++ b/db/migrate/20170707183807_add_group_id_to_milestones.rb @@ -1,4 +1,4 @@ -class AddGroupIdToMilestones < ActiveRecord::Migration +class AddGroupIdToMilestones < ActiveRecord::Migration[4.2] DOWNTIME = false def up @@ -14,12 +14,27 @@ class AddGroupIdToMilestones < ActiveRecord::Migration # with null values. execute "DELETE from milestones WHERE project_id IS NULL" - # Drop foreign key explicitly for MySQL. - if Gitlab::Database.mysql? - remove_foreign_key(:milestones, column: :group_id) if foreign_key_exists?(:milestones, column: :group_id) - end - + remove_foreign_key_for_mysql(:groups) remove_column :milestones, :group_id + + remove_foreign_key_for_mysql(:projects) change_column :milestones, :project_id, :integer, null: false + add_foreign_key_for_mysql(:projects) + end + + private + + # Create the foreign key explicitly for MySQL. + def add_foreign_key_for_mysql(target) + if Gitlab::Database.mysql? && !foreign_key_exists?(:milestones, target) + add_foreign_key :milestones, target, on_delete: :cascade + end + end + + # Drop the foreign key explicitly for MySQL. + def remove_foreign_key_for_mysql(target) + if Gitlab::Database.mysql? && foreign_key_exists?(:milestones, target) + remove_foreign_key :milestones, target + end end end diff --git a/db/migrate/20170707184243_add_group_milestone_id_indexes.rb b/db/migrate/20170707184243_add_group_milestone_id_indexes.rb index aa48fe90cad..545ee070194 100644 --- a/db/migrate/20170707184243_add_group_milestone_id_indexes.rb +++ b/db/migrate/20170707184243_add_group_milestone_id_indexes.rb @@ -1,4 +1,4 @@ -class AddGroupMilestoneIdIndexes < ActiveRecord::Migration +class AddGroupMilestoneIdIndexes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170707184244_remove_wrong_versions_from_schema_versions.rb b/db/migrate/20170707184244_remove_wrong_versions_from_schema_versions.rb index 38536a8b06a..f99206c7f78 100644 --- a/db/migrate/20170707184244_remove_wrong_versions_from_schema_versions.rb +++ b/db/migrate/20170707184244_remove_wrong_versions_from_schema_versions.rb @@ -1,4 +1,4 @@ -class RemoveWrongVersionsFromSchemaVersions < ActiveRecord::Migration +class RemoveWrongVersionsFromSchemaVersions < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20170710083355_clean_stage_id_reference_migration.rb b/db/migrate/20170710083355_clean_stage_id_reference_migration.rb index 681203eaf40..d33c6f53b15 100644 --- a/db/migrate/20170710083355_clean_stage_id_reference_migration.rb +++ b/db/migrate/20170710083355_clean_stage_id_reference_migration.rb @@ -1,4 +1,4 @@ -class CleanStageIdReferenceMigration < ActiveRecord::Migration +class CleanStageIdReferenceMigration < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170711145320_add_status_to_ci_stages.rb b/db/migrate/20170711145320_add_status_to_ci_stages.rb index d497a61a959..3ea7b750882 100644 --- a/db/migrate/20170711145320_add_status_to_ci_stages.rb +++ b/db/migrate/20170711145320_add_status_to_ci_stages.rb @@ -1,4 +1,4 @@ -class AddStatusToCiStages < ActiveRecord::Migration +class AddStatusToCiStages < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170713104829_add_foreign_key_to_merge_requests.rb b/db/migrate/20170713104829_add_foreign_key_to_merge_requests.rb index c25d4fd5986..b9aea6d5531 100644 --- a/db/migrate/20170713104829_add_foreign_key_to_merge_requests.rb +++ b/db/migrate/20170713104829_add_foreign_key_to_merge_requests.rb @@ -1,4 +1,4 @@ -class AddForeignKeyToMergeRequests < ActiveRecord::Migration +class AddForeignKeyToMergeRequests < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170717074009_move_system_upload_folder.rb b/db/migrate/20170717074009_move_system_upload_folder.rb index d3caa53a7a4..6c57a751c8d 100644 --- a/db/migrate/20170717074009_move_system_upload_folder.rb +++ b/db/migrate/20170717074009_move_system_upload_folder.rb @@ -1,4 +1,4 @@ -class MoveSystemUploadFolder < ActiveRecord::Migration +class MoveSystemUploadFolder < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb b/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb index 1a013e6aefb..d9ae86f6c52 100644 --- a/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb +++ b/db/migrate/20170717200542_add_trusted_column_to_oauth_applications.rb @@ -1,4 +1,4 @@ -class AddTrustedColumnToOauthApplications < ActiveRecord::Migration +class AddTrustedColumnToOauthApplications < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb b/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb index e1c4f033286..a5caca7e80c 100644 --- a/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb +++ b/db/migrate/20170720111708_add_lock_version_to_ci_stages.rb @@ -1,4 +1,4 @@ -class AddLockVersionToCiStages < ActiveRecord::Migration +class AddLockVersionToCiStages < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170720122741_create_user_custom_attributes.rb b/db/migrate/20170720122741_create_user_custom_attributes.rb index b1c0bebc633..0e6f37d7317 100644 --- a/db/migrate/20170720122741_create_user_custom_attributes.rb +++ b/db/migrate/20170720122741_create_user_custom_attributes.rb @@ -1,4 +1,4 @@ -class CreateUserCustomAttributes < ActiveRecord::Migration +class CreateUserCustomAttributes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170720130522_create_ci_pipeline_variables.rb b/db/migrate/20170720130522_create_ci_pipeline_variables.rb index a784f5dd142..4f162d46cf5 100644 --- a/db/migrate/20170720130522_create_ci_pipeline_variables.rb +++ b/db/migrate/20170720130522_create_ci_pipeline_variables.rb @@ -1,4 +1,4 @@ -class CreateCiPipelineVariables < ActiveRecord::Migration +class CreateCiPipelineVariables < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/20170720130749_add_foreign_key_to_ci_pipeline_variables.rb b/db/migrate/20170720130749_add_foreign_key_to_ci_pipeline_variables.rb index 550b8a88f02..df9350d9ad5 100644 --- a/db/migrate/20170720130749_add_foreign_key_to_ci_pipeline_variables.rb +++ b/db/migrate/20170720130749_add_foreign_key_to_ci_pipeline_variables.rb @@ -1,4 +1,4 @@ -class AddForeignKeyToCiPipelineVariables < ActiveRecord::Migration +class AddForeignKeyToCiPipelineVariables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170724214302_add_lower_path_index_to_redirect_routes.rb b/db/migrate/20170724214302_add_lower_path_index_to_redirect_routes.rb index db60c2087b9..ef0f65182d8 100644 --- a/db/migrate/20170724214302_add_lower_path_index_to_redirect_routes.rb +++ b/db/migrate/20170724214302_add_lower_path_index_to_redirect_routes.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddLowerPathIndexToRedirectRoutes < ActiveRecord::Migration +class AddLowerPathIndexToRedirectRoutes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170725145659_add_binary_to_merge_request_diff_files.rb b/db/migrate/20170725145659_add_binary_to_merge_request_diff_files.rb index 1f5fa7e3d49..c7d377547e4 100644 --- a/db/migrate/20170725145659_add_binary_to_merge_request_diff_files.rb +++ b/db/migrate/20170725145659_add_binary_to_merge_request_diff_files.rb @@ -1,4 +1,4 @@ -class AddBinaryToMergeRequestDiffFiles < ActiveRecord::Migration +class AddBinaryToMergeRequestDiffFiles < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170727123534_add_index_on_events_project_id_id.rb b/db/migrate/20170727123534_add_index_on_events_project_id_id.rb index 1c4aaaf9dd6..076b8ee87b2 100644 --- a/db/migrate/20170727123534_add_index_on_events_project_id_id.rb +++ b/db/migrate/20170727123534_add_index_on_events_project_id_id.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddIndexOnEventsProjectIdId < ActiveRecord::Migration +class AddIndexOnEventsProjectIdId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170731175128_add_percentages_to_conv_dev.rb b/db/migrate/20170731175128_add_percentages_to_conv_dev.rb index 1819bfc96bb..522e99c0751 100644 --- a/db/migrate/20170731175128_add_percentages_to_conv_dev.rb +++ b/db/migrate/20170731175128_add_percentages_to_conv_dev.rb @@ -1,4 +1,4 @@ -class AddPercentagesToConvDev < ActiveRecord::Migration +class AddPercentagesToConvDev < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb b/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb index a7d8f2f3604..3c677f3bc2d 100644 --- a/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb +++ b/db/migrate/20170731183033_add_merge_jid_to_merge_requests.rb @@ -1,4 +1,4 @@ -class AddMergeJidToMergeRequests < ActiveRecord::Migration +class AddMergeJidToMergeRequests < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170802013652_add_storage_fields_to_project.rb b/db/migrate/20170802013652_add_storage_fields_to_project.rb index c2381a9d0b2..d6672b9b3af 100644 --- a/db/migrate/20170802013652_add_storage_fields_to_project.rb +++ b/db/migrate/20170802013652_add_storage_fields_to_project.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddStorageFieldsToProject < ActiveRecord::Migration +class AddStorageFieldsToProject < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170803130232_reorganise_issues_indexes_for_faster_sorting.rb b/db/migrate/20170803130232_reorganise_issues_indexes_for_faster_sorting.rb index eb7d1be1732..e92b5f28685 100644 --- a/db/migrate/20170803130232_reorganise_issues_indexes_for_faster_sorting.rb +++ b/db/migrate/20170803130232_reorganise_issues_indexes_for_faster_sorting.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class ReorganiseIssuesIndexesForFasterSorting < ActiveRecord::Migration +class ReorganiseIssuesIndexesForFasterSorting < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170807071105_add_hashed_storage_to_settings.rb b/db/migrate/20170807071105_add_hashed_storage_to_settings.rb index 0846557add8..cfb89743127 100644 --- a/db/migrate/20170807071105_add_hashed_storage_to_settings.rb +++ b/db/migrate/20170807071105_add_hashed_storage_to_settings.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddHashedStorageToSettings < ActiveRecord::Migration +class AddHashedStorageToSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170809133343_add_broadcast_messages_index.rb b/db/migrate/20170809133343_add_broadcast_messages_index.rb index 4ab2ddb059d..bcbc6c9f7d2 100644 --- a/db/migrate/20170809133343_add_broadcast_messages_index.rb +++ b/db/migrate/20170809133343_add_broadcast_messages_index.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddBroadcastMessagesIndex < ActiveRecord::Migration +class AddBroadcastMessagesIndex < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170809134534_add_broadcast_message_not_null_constraints.rb b/db/migrate/20170809134534_add_broadcast_message_not_null_constraints.rb index 5551fb51a6e..fd8cdbb95aa 100644 --- a/db/migrate/20170809134534_add_broadcast_message_not_null_constraints.rb +++ b/db/migrate/20170809134534_add_broadcast_message_not_null_constraints.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddBroadcastMessageNotNullConstraints < ActiveRecord::Migration +class AddBroadcastMessageNotNullConstraints < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170809142252_cleanup_appearances_schema.rb b/db/migrate/20170809142252_cleanup_appearances_schema.rb index acf45060114..4c5d6a6d75d 100644 --- a/db/migrate/20170809142252_cleanup_appearances_schema.rb +++ b/db/migrate/20170809142252_cleanup_appearances_schema.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class CleanupAppearancesSchema < ActiveRecord::Migration +class CleanupAppearancesSchema < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170809161910_add_project_export_enabled_to_application_settings.rb b/db/migrate/20170809161910_add_project_export_enabled_to_application_settings.rb index 4baba1ade6d..9dd520de264 100644 --- a/db/migrate/20170809161910_add_project_export_enabled_to_application_settings.rb +++ b/db/migrate/20170809161910_add_project_export_enabled_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddProjectExportEnabledToApplicationSettings < ActiveRecord::Migration +class AddProjectExportEnabledToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/migrate/20170816133938_add_access_level_to_ci_runners.rb b/db/migrate/20170816133938_add_access_level_to_ci_runners.rb index fc484730f42..5a1ea9514d1 100644 --- a/db/migrate/20170816133938_add_access_level_to_ci_runners.rb +++ b/db/migrate/20170816133938_add_access_level_to_ci_runners.rb @@ -1,4 +1,4 @@ -class AddAccessLevelToCiRunners < ActiveRecord::Migration +class AddAccessLevelToCiRunners < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170816133940_add_protected_to_ci_builds.rb b/db/migrate/20170816133940_add_protected_to_ci_builds.rb index c73a4387d29..13e1be0d89c 100644 --- a/db/migrate/20170816133940_add_protected_to_ci_builds.rb +++ b/db/migrate/20170816133940_add_protected_to_ci_builds.rb @@ -1,4 +1,4 @@ -class AddProtectedToCiBuilds < ActiveRecord::Migration +class AddProtectedToCiBuilds < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170816143940_add_protected_to_ci_pipelines.rb b/db/migrate/20170816143940_add_protected_to_ci_pipelines.rb index ce8f1e03686..aefaf4a487b 100644 --- a/db/migrate/20170816143940_add_protected_to_ci_pipelines.rb +++ b/db/migrate/20170816143940_add_protected_to_ci_pipelines.rb @@ -1,4 +1,4 @@ -class AddProtectedToCiPipelines < ActiveRecord::Migration +class AddProtectedToCiPipelines < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170816153940_add_index_on_ci_builds_protected.rb b/db/migrate/20170816153940_add_index_on_ci_builds_protected.rb index caf7c705a6e..fbe5fe31ae8 100644 --- a/db/migrate/20170816153940_add_index_on_ci_builds_protected.rb +++ b/db/migrate/20170816153940_add_index_on_ci_builds_protected.rb @@ -1,4 +1,4 @@ -class AddIndexOnCiBuildsProtected < ActiveRecord::Migration +class AddIndexOnCiBuildsProtected < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170816234252_add_theme_id_to_users.rb b/db/migrate/20170816234252_add_theme_id_to_users.rb index 5043f9ec591..bd04445cac6 100644 --- a/db/migrate/20170816234252_add_theme_id_to_users.rb +++ b/db/migrate/20170816234252_add_theme_id_to_users.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddThemeIdToUsers < ActiveRecord::Migration +class AddThemeIdToUsers < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170817123339_add_verification_status_to_gpg_signatures.rb b/db/migrate/20170817123339_add_verification_status_to_gpg_signatures.rb index 128cd109f8d..c7d81dc005a 100644 --- a/db/migrate/20170817123339_add_verification_status_to_gpg_signatures.rb +++ b/db/migrate/20170817123339_add_verification_status_to_gpg_signatures.rb @@ -1,4 +1,4 @@ -class AddVerificationStatusToGpgSignatures < ActiveRecord::Migration +class AddVerificationStatusToGpgSignatures < ActiveRecord::Migration[4.2] DOWNTIME = false include Gitlab::Database::MigrationHelpers diff --git a/db/migrate/20170820100558_correct_protected_tags_foreign_keys.rb b/db/migrate/20170820100558_correct_protected_tags_foreign_keys.rb index 229298e1946..82e05885b0e 100644 --- a/db/migrate/20170820100558_correct_protected_tags_foreign_keys.rb +++ b/db/migrate/20170820100558_correct_protected_tags_foreign_keys.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class CorrectProtectedTagsForeignKeys < ActiveRecord::Migration +class CorrectProtectedTagsForeignKeys < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170820120108_create_user_synced_attributes_metadata.rb b/db/migrate/20170820120108_create_user_synced_attributes_metadata.rb index 79028e34987..131dcf7ac25 100644 --- a/db/migrate/20170820120108_create_user_synced_attributes_metadata.rb +++ b/db/migrate/20170820120108_create_user_synced_attributes_metadata.rb @@ -1,4 +1,4 @@ -class CreateUserSyncedAttributesMetadata < ActiveRecord::Migration +class CreateUserSyncedAttributesMetadata < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170824101926_add_auto_devops_enabled_to_application_settings.rb b/db/migrate/20170824101926_add_auto_devops_enabled_to_application_settings.rb index da518d8215c..f7c0aeab8f9 100644 --- a/db/migrate/20170824101926_add_auto_devops_enabled_to_application_settings.rb +++ b/db/migrate/20170824101926_add_auto_devops_enabled_to_application_settings.rb @@ -1,4 +1,4 @@ -class AddAutoDevopsEnabledToApplicationSettings < ActiveRecord::Migration +class AddAutoDevopsEnabledToApplicationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170824162758_allow_appearances_description_html_null.rb b/db/migrate/20170824162758_allow_appearances_description_html_null.rb index d7f481ee894..6efa3452796 100644 --- a/db/migrate/20170824162758_allow_appearances_description_html_null.rb +++ b/db/migrate/20170824162758_allow_appearances_description_html_null.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AllowAppearancesDescriptionHtmlNull < ActiveRecord::Migration +class AllowAppearancesDescriptionHtmlNull < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170825104051_migrate_issues_to_ghost_user.rb b/db/migrate/20170825104051_migrate_issues_to_ghost_user.rb index c5fb5762d61..b1adccc9c5c 100644 --- a/db/migrate/20170825104051_migrate_issues_to_ghost_user.rb +++ b/db/migrate/20170825104051_migrate_issues_to_ghost_user.rb @@ -1,4 +1,4 @@ -class MigrateIssuesToGhostUser < ActiveRecord::Migration +class MigrateIssuesToGhostUser < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170825154015_resolve_outdated_diff_discussions.rb b/db/migrate/20170825154015_resolve_outdated_diff_discussions.rb index 235530bb1e6..1aed21f10a0 100644 --- a/db/migrate/20170825154015_resolve_outdated_diff_discussions.rb +++ b/db/migrate/20170825154015_resolve_outdated_diff_discussions.rb @@ -1,4 +1,4 @@ -class ResolveOutdatedDiffDiscussions < ActiveRecord::Migration +class ResolveOutdatedDiffDiscussions < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170828093725_create_project_auto_dev_ops.rb b/db/migrate/20170828093725_create_project_auto_dev_ops.rb index c1bb4f20c1d..ea895dc14c1 100644 --- a/db/migrate/20170828093725_create_project_auto_dev_ops.rb +++ b/db/migrate/20170828093725_create_project_auto_dev_ops.rb @@ -1,4 +1,4 @@ -class CreateProjectAutoDevOps < ActiveRecord::Migration +class CreateProjectAutoDevOps < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170828135939_migrate_user_external_mail_data.rb b/db/migrate/20170828135939_migrate_user_external_mail_data.rb index f7ac87374b6..9ee4a4598bf 100644 --- a/db/migrate/20170828135939_migrate_user_external_mail_data.rb +++ b/db/migrate/20170828135939_migrate_user_external_mail_data.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MigrateUserExternalMailData < ActiveRecord::Migration +class MigrateUserExternalMailData < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170830125940_add_failure_reason_to_ci_builds.rb b/db/migrate/20170830125940_add_failure_reason_to_ci_builds.rb index 5a7487b9227..44f709868ca 100644 --- a/db/migrate/20170830125940_add_failure_reason_to_ci_builds.rb +++ b/db/migrate/20170830125940_add_failure_reason_to_ci_builds.rb @@ -1,4 +1,4 @@ -class AddFailureReasonToCiBuilds < ActiveRecord::Migration +class AddFailureReasonToCiBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170830130119_steal_remaining_event_migration_jobs.rb b/db/migrate/20170830130119_steal_remaining_event_migration_jobs.rb index 0dfdc4ed261..bcc34d56d2d 100644 --- a/db/migrate/20170830130119_steal_remaining_event_migration_jobs.rb +++ b/db/migrate/20170830130119_steal_remaining_event_migration_jobs.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class StealRemainingEventMigrationJobs < ActiveRecord::Migration +class StealRemainingEventMigrationJobs < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170830131015_swap_event_migration_tables.rb b/db/migrate/20170830131015_swap_event_migration_tables.rb index a256de4a8af..fb3b2472ffe 100644 --- a/db/migrate/20170830131015_swap_event_migration_tables.rb +++ b/db/migrate/20170830131015_swap_event_migration_tables.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class SwapEventMigrationTables < ActiveRecord::Migration +class SwapEventMigrationTables < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170831092813_add_config_source_to_pipelines.rb b/db/migrate/20170831092813_add_config_source_to_pipelines.rb index ff51e968abd..ba1f73f0e68 100644 --- a/db/migrate/20170831092813_add_config_source_to_pipelines.rb +++ b/db/migrate/20170831092813_add_config_source_to_pipelines.rb @@ -1,4 +1,4 @@ -class AddConfigSourceToPipelines < ActiveRecord::Migration +class AddConfigSourceToPipelines < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/migrate/20170901071411_add_foreign_key_to_issue_author.rb b/db/migrate/20170901071411_add_foreign_key_to_issue_author.rb index ab6e9fb565a..00d0b0f2c7f 100644 --- a/db/migrate/20170901071411_add_foreign_key_to_issue_author.rb +++ b/db/migrate/20170901071411_add_foreign_key_to_issue_author.rb @@ -1,4 +1,4 @@ -class AddForeignKeyToIssueAuthor < ActiveRecord::Migration +class AddForeignKeyToIssueAuthor < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170905112933_add_resolved_by_push_to_notes.rb b/db/migrate/20170905112933_add_resolved_by_push_to_notes.rb index ceb31ffb08a..1f27ea3c467 100644 --- a/db/migrate/20170905112933_add_resolved_by_push_to_notes.rb +++ b/db/migrate/20170905112933_add_resolved_by_push_to_notes.rb @@ -1,4 +1,4 @@ -class AddResolvedByPushToNotes < ActiveRecord::Migration +class AddResolvedByPushToNotes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170912113435_clean_stages_statuses_migration.rb b/db/migrate/20170912113435_clean_stages_statuses_migration.rb index fc091d7894e..f2040f819cd 100644 --- a/db/migrate/20170912113435_clean_stages_statuses_migration.rb +++ b/db/migrate/20170912113435_clean_stages_statuses_migration.rb @@ -1,4 +1,4 @@ -class CleanStagesStatusesMigration < ActiveRecord::Migration +class CleanStagesStatusesMigration < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170913131410_environments_project_id_not_null.rb b/db/migrate/20170913131410_environments_project_id_not_null.rb index d5404f8ede9..ad04f4304bf 100644 --- a/db/migrate/20170913131410_environments_project_id_not_null.rb +++ b/db/migrate/20170913131410_environments_project_id_not_null.rb @@ -1,16 +1,41 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class EnvironmentsProjectIdNotNull < ActiveRecord::Migration +class EnvironmentsProjectIdNotNull < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false def up + remove_foreign_key_for_mysql + change_column_null :environments, :project_id, false + + add_foreign_key_for_mysql end def down + remove_foreign_key_for_mysql + change_column_null :environments, :project_id, true + + add_foreign_key_for_mysql + end + + private + + # Create the foreign key explicitly for MySQL. + def add_foreign_key_for_mysql + if Gitlab::Database.mysql? && !foreign_key_exists?(:environments, :projects) + add_foreign_key :environments, :projects, on_delete: :cascade + end + end + + # Drop the foreign key explicitly for MySQL. + def remove_foreign_key_for_mysql + if Gitlab::Database.mysql? && foreign_key_exists?(:environments, :projects) + remove_foreign_key :environments, :projects + end end end + diff --git a/db/migrate/20170914135630_add_index_for_recent_push_events.rb b/db/migrate/20170914135630_add_index_for_recent_push_events.rb index 99f593b0465..ac86185ba50 100644 --- a/db/migrate/20170914135630_add_index_for_recent_push_events.rb +++ b/db/migrate/20170914135630_add_index_for_recent_push_events.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddIndexForRecentPushEvents < ActiveRecord::Migration +class AddIndexForRecentPushEvents < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170918222253_reorganize_deployments_indexes.rb b/db/migrate/20170918222253_reorganize_deployments_indexes.rb index 139427ed2b9..480847ac393 100644 --- a/db/migrate/20170918222253_reorganize_deployments_indexes.rb +++ b/db/migrate/20170918222253_reorganize_deployments_indexes.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class ReorganizeDeploymentsIndexes < ActiveRecord::Migration +class ReorganizeDeploymentsIndexes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb b/db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb index b91efb86d98..8e165ac647d 100644 --- a/db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb +++ b/db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddDeploymentsIndexForLastDeployment < ActiveRecord::Migration +class AddDeploymentsIndexForLastDeployment < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb b/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb index b2009b282e9..dd61ce67f1d 100644 --- a/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb +++ b/db/migrate/20170919211300_remove_temporary_ci_builds_index.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveTemporaryCiBuildsIndex < ActiveRecord::Migration +class RemoveTemporaryCiBuildsIndex < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/20170921115009_add_project_repository_storage_index.rb b/db/migrate/20170921115009_add_project_repository_storage_index.rb index 1c5a8fd65e1..9e1f5052f28 100644 --- a/db/migrate/20170921115009_add_project_repository_storage_index.rb +++ b/db/migrate/20170921115009_add_project_repository_storage_index.rb @@ -1,4 +1,4 @@ -class AddProjectRepositoryStorageIndex < ActiveRecord::Migration +class AddProjectRepositoryStorageIndex < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/migrate/20170928100231_add_composite_index_on_merge_requests_merge_commit_sha.rb b/db/migrate/20170928100231_add_composite_index_on_merge_requests_merge_commit_sha.rb index 9f02daf04c1..cb16589e8db 100644 --- a/db/migrate/20170928100231_add_composite_index_on_merge_requests_merge_commit_sha.rb +++ b/db/migrate/20170928100231_add_composite_index_on_merge_requests_merge_commit_sha.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddCompositeIndexOnMergeRequestsMergeCommitSha < ActiveRecord::Migration +class AddCompositeIndexOnMergeRequestsMergeCommitSha < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/migrate/limits_to_mysql.rb b/db/migrate/limits_to_mysql.rb index 5cd9f3198e3..4c7ef2eb858 100644 --- a/db/migrate/limits_to_mysql.rb +++ b/db/migrate/limits_to_mysql.rb @@ -1,5 +1,5 @@ # rubocop:disable all -class LimitsToMysql < ActiveRecord::Migration +class LimitsToMysql < ActiveRecord::Migration[4.2] def up return unless ActiveRecord::Base.configurations[Rails.env]['adapter'] =~ /^mysql/ diff --git a/db/migrate/markdown_cache_limits_to_mysql.rb b/db/migrate/markdown_cache_limits_to_mysql.rb index f6686db3dc0..f99d500a137 100644 --- a/db/migrate/markdown_cache_limits_to_mysql.rb +++ b/db/migrate/markdown_cache_limits_to_mysql.rb @@ -1,4 +1,4 @@ -class MarkdownCacheLimitsToMysql < ActiveRecord::Migration +class MarkdownCacheLimitsToMysql < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/migrate/merge_request_diff_file_limits_to_mysql.rb b/db/migrate/merge_request_diff_file_limits_to_mysql.rb index 3958380e4b9..32b41e1b1ab 100644 --- a/db/migrate/merge_request_diff_file_limits_to_mysql.rb +++ b/db/migrate/merge_request_diff_file_limits_to_mysql.rb @@ -1,4 +1,4 @@ -class MergeRequestDiffFileLimitsToMysql < ActiveRecord::Migration +class MergeRequestDiffFileLimitsToMysql < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/post_migrate/20160824121037_change_personal_access_tokens_default_back_to_empty_array.rb b/db/post_migrate/20160824121037_change_personal_access_tokens_default_back_to_empty_array.rb index 7df561d82dd..099814d7556 100644 --- a/db/post_migrate/20160824121037_change_personal_access_tokens_default_back_to_empty_array.rb +++ b/db/post_migrate/20160824121037_change_personal_access_tokens_default_back_to_empty_array.rb @@ -4,7 +4,7 @@ # # Details: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5951#note_19721973 -class ChangePersonalAccessTokensDefaultBackToEmptyArray < ActiveRecord::Migration +class ChangePersonalAccessTokensDefaultBackToEmptyArray < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb b/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb index 319d86ac159..bf3aee99418 100644 --- a/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb +++ b/db/post_migrate/20161011222551_remove_inactive_jira_service_properties.rb @@ -1,4 +1,4 @@ -class RemoveInactiveJiraServiceProperties < ActiveRecord::Migration +class RemoveInactiveJiraServiceProperties < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = true diff --git a/db/post_migrate/20161109150329_fix_project_records_with_invalid_visibility.rb b/db/post_migrate/20161109150329_fix_project_records_with_invalid_visibility.rb index 906616f9c0a..6d9c7e4ed72 100644 --- a/db/post_migrate/20161109150329_fix_project_records_with_invalid_visibility.rb +++ b/db/post_migrate/20161109150329_fix_project_records_with_invalid_visibility.rb @@ -1,4 +1,4 @@ -class FixProjectRecordsWithInvalidVisibility < ActiveRecord::Migration +class FixProjectRecordsWithInvalidVisibility < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers BATCH_SIZE = 500 diff --git a/db/post_migrate/20161128170531_drop_user_activities_table.rb b/db/post_migrate/20161128170531_drop_user_activities_table.rb index 00bc0c73015..64d13a08953 100644 --- a/db/post_migrate/20161128170531_drop_user_activities_table.rb +++ b/db/post_migrate/20161128170531_drop_user_activities_table.rb @@ -1,4 +1,4 @@ -class DropUserActivitiesTable < ActiveRecord::Migration +class DropUserActivitiesTable < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20161221140236_remove_unneeded_services.rb b/db/post_migrate/20161221140236_remove_unneeded_services.rb index 6b7e94c8641..31f24263877 100644 --- a/db/post_migrate/20161221140236_remove_unneeded_services.rb +++ b/db/post_migrate/20161221140236_remove_unneeded_services.rb @@ -1,4 +1,4 @@ -class RemoveUnneededServices < ActiveRecord::Migration +class RemoveUnneededServices < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20161221153951_rename_reserved_project_names.rb b/db/post_migrate/20161221153951_rename_reserved_project_names.rb index d322844e2fd..5ba9068b6de 100644 --- a/db/post_migrate/20161221153951_rename_reserved_project_names.rb +++ b/db/post_migrate/20161221153951_rename_reserved_project_names.rb @@ -1,6 +1,6 @@ require 'thread' -class RenameReservedProjectNames < ActiveRecord::Migration +class RenameReservedProjectNames < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers include Gitlab::ShellAdapter diff --git a/db/post_migrate/20170104150317_requeue_pending_delete_projects.rb b/db/post_migrate/20170104150317_requeue_pending_delete_projects.rb index d7be004d47f..f567accb051 100644 --- a/db/post_migrate/20170104150317_requeue_pending_delete_projects.rb +++ b/db/post_migrate/20170104150317_requeue_pending_delete_projects.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RequeuePendingDeleteProjects < ActiveRecord::Migration +class RequeuePendingDeleteProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170106142508_fill_authorized_projects.rb b/db/post_migrate/20170106142508_fill_authorized_projects.rb index 0ca20587981..1f1dd0f47f0 100644 --- a/db/post_migrate/20170106142508_fill_authorized_projects.rb +++ b/db/post_migrate/20170106142508_fill_authorized_projects.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class FillAuthorizedProjects < ActiveRecord::Migration +class FillAuthorizedProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers class User < ActiveRecord::Base diff --git a/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb b/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb index 7c788160022..893af23465a 100644 --- a/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb +++ b/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveProjectAuthorizationsIdColumn < ActiveRecord::Migration +class RemoveProjectAuthorizationsIdColumn < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170131214021_reset_users_authorized_projects_populated.rb b/db/post_migrate/20170131214021_reset_users_authorized_projects_populated.rb index 82f8147547e..a03be441cb4 100644 --- a/db/post_migrate/20170131214021_reset_users_authorized_projects_populated.rb +++ b/db/post_migrate/20170131214021_reset_users_authorized_projects_populated.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/UpdateColumnInBatches -class ResetUsersAuthorizedProjectsPopulated < ActiveRecord::Migration +class ResetUsersAuthorizedProjectsPopulated < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb b/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb index a8e63e8bc7d..f221dac8e20 100644 --- a/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb +++ b/db/post_migrate/20170206040400_remove_inactive_default_email_services.rb @@ -1,4 +1,4 @@ -class RemoveInactiveDefaultEmailServices < ActiveRecord::Migration +class RemoveInactiveDefaultEmailServices < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170206101007_remove_trackable_columns_from_timelogs.rb b/db/post_migrate/20170206101007_remove_trackable_columns_from_timelogs.rb index aee0c1b6245..14f5d0d4add 100644 --- a/db/post_migrate/20170206101007_remove_trackable_columns_from_timelogs.rb +++ b/db/post_migrate/20170206101007_remove_trackable_columns_from_timelogs.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveTrackableColumnsFromTimelogs < ActiveRecord::Migration +class RemoveTrackableColumnsFromTimelogs < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170206101030_validate_foreign_keys_on_timelogs.rb b/db/post_migrate/20170206101030_validate_foreign_keys_on_timelogs.rb index f397ef919cc..b5a5c0f06c7 100644 --- a/db/post_migrate/20170206101030_validate_foreign_keys_on_timelogs.rb +++ b/db/post_migrate/20170206101030_validate_foreign_keys_on_timelogs.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class ValidateForeignKeysOnTimelogs < ActiveRecord::Migration +class ValidateForeignKeysOnTimelogs < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb b/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb index e206f9af636..81ac4cf1373 100644 --- a/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb +++ b/db/post_migrate/20170209140523_validate_foreign_keys_on_oauth_openid_requests.rb @@ -1,4 +1,4 @@ -class ValidateForeignKeysOnOauthOpenidRequests < ActiveRecord::Migration +class ValidateForeignKeysOnOauthOpenidRequests < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170211073944_disable_invalid_service_templates.rb b/db/post_migrate/20170211073944_disable_invalid_service_templates.rb index 603efc43782..31234e5b086 100644 --- a/db/post_migrate/20170211073944_disable_invalid_service_templates.rb +++ b/db/post_migrate/20170211073944_disable_invalid_service_templates.rb @@ -1,4 +1,4 @@ -class DisableInvalidServiceTemplates < ActiveRecord::Migration +class DisableInvalidServiceTemplates < ActiveRecord::Migration[4.2] DOWNTIME = false class Service < ActiveRecord::Base diff --git a/db/post_migrate/20170214111112_delete_deprecated_gitlab_ci_service.rb b/db/post_migrate/20170214111112_delete_deprecated_gitlab_ci_service.rb index 09a827d22b0..c273060f8b0 100644 --- a/db/post_migrate/20170214111112_delete_deprecated_gitlab_ci_service.rb +++ b/db/post_migrate/20170214111112_delete_deprecated_gitlab_ci_service.rb @@ -1,4 +1,4 @@ -class DeleteDeprecatedGitlabCiService < ActiveRecord::Migration +class DeleteDeprecatedGitlabCiService < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170215200045_remove_theme_id_from_users.rb b/db/post_migrate/20170215200045_remove_theme_id_from_users.rb index c51646fbe52..937fe3f57af 100644 --- a/db/post_migrate/20170215200045_remove_theme_id_from_users.rb +++ b/db/post_migrate/20170215200045_remove_theme_id_from_users.rb @@ -1,4 +1,4 @@ -class RemoveThemeIdFromUsers < ActiveRecord::Migration +class RemoveThemeIdFromUsers < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb b/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb index 04bf89c9687..c2d28d79491 100644 --- a/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb +++ b/db/post_migrate/20170301205640_migrate_build_events_to_pipeline_events.rb @@ -1,4 +1,4 @@ -class MigrateBuildEventsToPipelineEvents < ActiveRecord::Migration +class MigrateBuildEventsToPipelineEvents < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb b/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb index ec6e8cdfc45..aa12e8ac3da 100644 --- a/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb +++ b/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb @@ -1,4 +1,4 @@ -class MigrateLegacyManualActions < ActiveRecord::Migration +class MigrateLegacyManualActions < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb b/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb index 01fff680183..f08adf4ce19 100644 --- a/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb +++ b/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/UpdateColumnInBatches -class ResetRelativePositionForIssue < ActiveRecord::Migration +class ResetRelativePositionForIssue < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb b/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb index 6a49450cc50..ab2c3552eec 100644 --- a/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb +++ b/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb @@ -1,6 +1,6 @@ require 'thread' -class RenameMoreReservedProjectNames < ActiveRecord::Migration +class RenameMoreReservedProjectNames < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers include Gitlab::ShellAdapter diff --git a/db/post_migrate/20170317162059_update_upload_paths_to_system.rb b/db/post_migrate/20170317162059_update_upload_paths_to_system.rb index 92e33848bf0..a5a6f043e10 100644 --- a/db/post_migrate/20170317162059_update_upload_paths_to_system.rb +++ b/db/post_migrate/20170317162059_update_upload_paths_to_system.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class UpdateUploadPathsToSystem < ActiveRecord::Migration +class UpdateUploadPathsToSystem < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170324160416_migrate_user_activities_to_users_last_activity_on.rb b/db/post_migrate/20170324160416_migrate_user_activities_to_users_last_activity_on.rb index f2debf236d4..0da273079fb 100644 --- a/db/post_migrate/20170324160416_migrate_user_activities_to_users_last_activity_on.rb +++ b/db/post_migrate/20170324160416_migrate_user_activities_to_users_last_activity_on.rb @@ -1,4 +1,4 @@ -class MigrateUserActivitiesToUsersLastActivityOn < ActiveRecord::Migration +class MigrateUserActivitiesToUsersLastActivityOn < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/post_migrate/20170404170532_remove_notes_original_discussion_id.rb b/db/post_migrate/20170404170532_remove_notes_original_discussion_id.rb index 0c3b3bd5eb3..334742f04e4 100644 --- a/db/post_migrate/20170404170532_remove_notes_original_discussion_id.rb +++ b/db/post_migrate/20170404170532_remove_notes_original_discussion_id.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveNotesOriginalDiscussionId < ActiveRecord::Migration +class RemoveNotesOriginalDiscussionId < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170406111121_clean_upload_symlinks.rb b/db/post_migrate/20170406111121_clean_upload_symlinks.rb index f2ce25d4524..955fce1651e 100644 --- a/db/post_migrate/20170406111121_clean_upload_symlinks.rb +++ b/db/post_migrate/20170406111121_clean_upload_symlinks.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class CleanUploadSymlinks < ActiveRecord::Migration +class CleanUploadSymlinks < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/post_migrate/20170406142253_migrate_user_project_view.rb b/db/post_migrate/20170406142253_migrate_user_project_view.rb index c4e910b3b44..89f40fb0577 100644 --- a/db/post_migrate/20170406142253_migrate_user_project_view.rb +++ b/db/post_migrate/20170406142253_migrate_user_project_view.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MigrateUserProjectView < ActiveRecord::Migration +class MigrateUserProjectView < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/post_migrate/20170408033905_remove_old_cache_directories.rb b/db/post_migrate/20170408033905_remove_old_cache_directories.rb index b23b52896b9..22bc5b9db7b 100644 --- a/db/post_migrate/20170408033905_remove_old_cache_directories.rb +++ b/db/post_migrate/20170408033905_remove_old_cache_directories.rb @@ -4,7 +4,7 @@ # Remove all files from old custom carrierwave's cache directories. # See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9466 -class RemoveOldCacheDirectories < ActiveRecord::Migration +class RemoveOldCacheDirectories < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb b/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb index 08cf366f0a1..c9ff91b0401 100644 --- a/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb +++ b/db/post_migrate/20170412174900_rename_reserved_dynamic_paths.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RenameReservedDynamicPaths < ActiveRecord::Migration +class RenameReservedDynamicPaths < ActiveRecord::Migration[4.2] include Gitlab::Database::RenameReservedPathsMigration::V1 DOWNTIME = false diff --git a/db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb b/db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb index dae9750558f..99ded277277 100644 --- a/db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb +++ b/db/post_migrate/20170425121605_migrate_trigger_schedules_to_pipeline_schedules.rb @@ -1,4 +1,4 @@ -class MigrateTriggerSchedulesToPipelineSchedules < ActiveRecord::Migration +class MigrateTriggerSchedulesToPipelineSchedules < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb b/db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb index 159b533eaaa..b5e3e06c56f 100644 --- a/db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb +++ b/db/post_migrate/20170425130047_drop_ci_trigger_schedules_table.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/Datetime -class DropCiTriggerSchedulesTable < ActiveRecord::Migration +class DropCiTriggerSchedulesTable < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb b/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb index 765daa0a347..f1aa8e759a2 100644 --- a/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb +++ b/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb @@ -1,5 +1,5 @@ # rubocop:disable Migration/UpdateColumnInBatches -class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration +class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb b/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb index 5238a2ba1b7..c018d30c175 100644 --- a/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb +++ b/db/post_migrate/20170502101023_cleanup_namespaceless_pending_delete_projects.rb @@ -1,6 +1,6 @@ # This is the counterpart of RequeuePendingDeleteProjects and cleans all # projects with `pending_delete = true` and that do not have a namespace. -class CleanupNamespacelessPendingDeleteProjects < ActiveRecord::Migration +class CleanupNamespacelessPendingDeleteProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170503004427_update_retried_for_ci_build.rb b/db/post_migrate/20170503004427_update_retried_for_ci_build.rb index 9d9f36550e7..3b9875b7897 100644 --- a/db/post_migrate/20170503004427_update_retried_for_ci_build.rb +++ b/db/post_migrate/20170503004427_update_retried_for_ci_build.rb @@ -1,4 +1,4 @@ -class UpdateRetriedForCiBuild < ActiveRecord::Migration +class UpdateRetriedForCiBuild < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170503120310_remove_users_authorized_projects_populated.rb b/db/post_migrate/20170503120310_remove_users_authorized_projects_populated.rb index 1b44334395f..891ce44f60a 100644 --- a/db/post_migrate/20170503120310_remove_users_authorized_projects_populated.rb +++ b/db/post_migrate/20170503120310_remove_users_authorized_projects_populated.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveUsersAuthorizedProjectsPopulated < ActiveRecord::Migration +class RemoveUsersAuthorizedProjectsPopulated < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb b/db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb index f77078ddd70..f61a8f725a1 100644 --- a/db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb +++ b/db/post_migrate/20170508170547_add_head_pipeline_for_each_merge_request.rb @@ -1,4 +1,4 @@ -class AddHeadPipelineForEachMergeRequest < ActiveRecord::Migration +class AddHeadPipelineForEachMergeRequest < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170510101043_add_foreign_key_on_pipeline_schedule_owner.rb b/db/post_migrate/20170510101043_add_foreign_key_on_pipeline_schedule_owner.rb index 6a870f08e89..85586aecd54 100644 --- a/db/post_migrate/20170510101043_add_foreign_key_on_pipeline_schedule_owner.rb +++ b/db/post_migrate/20170510101043_add_foreign_key_on_pipeline_schedule_owner.rb @@ -1,4 +1,4 @@ -class AddForeignKeyOnPipelineScheduleOwner < ActiveRecord::Migration +class AddForeignKeyOnPipelineScheduleOwner < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb b/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb index 281be90163a..b4a3db65607 100644 --- a/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb +++ b/db/post_migrate/20170511100900_cleanup_rename_web_hooks_build_events_to_job_events.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class CleanupRenameWebHooksBuildEventsToJobEvents < ActiveRecord::Migration +class CleanupRenameWebHooksBuildEventsToJobEvents < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb b/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb index 5d26df5688f..65342747321 100644 --- a/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb +++ b/db/post_migrate/20170511101000_cleanup_rename_services_build_events_to_job_events.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class CleanupRenameServicesBuildEventsToJobEvents < ActiveRecord::Migration +class CleanupRenameServicesBuildEventsToJobEvents < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170516165238_cleanup_trigger_for_issues.rb b/db/post_migrate/20170516165238_cleanup_trigger_for_issues.rb index 378fe5603c3..affeba52250 100644 --- a/db/post_migrate/20170516165238_cleanup_trigger_for_issues.rb +++ b/db/post_migrate/20170516165238_cleanup_trigger_for_issues.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class CleanupTriggerForIssues < ActiveRecord::Migration +class CleanupTriggerForIssues < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb b/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb index 6fa573c5b49..03456a31b0d 100644 --- a/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb +++ b/db/post_migrate/20170516181025_add_constraints_to_issue_assignees_table.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class AddConstraintsToIssueAssigneesTable < ActiveRecord::Migration +class AddConstraintsToIssueAssigneesTable < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers # Set this constant to true if this migration requires downtime. diff --git a/db/post_migrate/20170518200835_rename_users_with_renamed_namespace.rb b/db/post_migrate/20170518200835_rename_users_with_renamed_namespace.rb index da0fcda87a6..da7d19ab134 100644 --- a/db/post_migrate/20170518200835_rename_users_with_renamed_namespace.rb +++ b/db/post_migrate/20170518200835_rename_users_with_renamed_namespace.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RenameUsersWithRenamedNamespace < ActiveRecord::Migration +class RenameUsersWithRenamedNamespace < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170518231126_fix_wrongly_renamed_routes.rb b/db/post_migrate/20170518231126_fix_wrongly_renamed_routes.rb index c78beda9d21..0d0eed7ae2a 100644 --- a/db/post_migrate/20170518231126_fix_wrongly_renamed_routes.rb +++ b/db/post_migrate/20170518231126_fix_wrongly_renamed_routes.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class FixWronglyRenamedRoutes < ActiveRecord::Migration +class FixWronglyRenamedRoutes < ActiveRecord::Migration[4.2] include Gitlab::Database::RenameReservedPathsMigration::V1 DOWNTIME = false diff --git a/db/post_migrate/20170523083112_migrate_old_artifacts.rb b/db/post_migrate/20170523083112_migrate_old_artifacts.rb index 3a77b9751d3..55e155c7619 100644 --- a/db/post_migrate/20170523083112_migrate_old_artifacts.rb +++ b/db/post_migrate/20170523083112_migrate_old_artifacts.rb @@ -1,4 +1,4 @@ -class MigrateOldArtifacts < ActiveRecord::Migration +class MigrateOldArtifacts < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb b/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb index 9441b236c8d..aa9f36bb437 100644 --- a/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb +++ b/db/post_migrate/20170525140254_rename_all_reserved_paths_again.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RenameAllReservedPathsAgain < ActiveRecord::Migration +class RenameAllReservedPathsAgain < ActiveRecord::Migration[4.2] include Gitlab::Database::RenameReservedPathsMigration::V1 DOWNTIME = false diff --git a/db/post_migrate/20170526185842_migrate_pipeline_stages.rb b/db/post_migrate/20170526185842_migrate_pipeline_stages.rb index afd4db183c2..0bba2155f85 100644 --- a/db/post_migrate/20170526185842_migrate_pipeline_stages.rb +++ b/db/post_migrate/20170526185842_migrate_pipeline_stages.rb @@ -1,4 +1,4 @@ -class MigratePipelineStages < ActiveRecord::Migration +class MigratePipelineStages < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170526185858_create_index_in_pipeline_stages.rb b/db/post_migrate/20170526185858_create_index_in_pipeline_stages.rb index ec9ff33b6b7..dc7b1d6d026 100644 --- a/db/post_migrate/20170526185858_create_index_in_pipeline_stages.rb +++ b/db/post_migrate/20170526185858_create_index_in_pipeline_stages.rb @@ -1,4 +1,4 @@ -class CreateIndexInPipelineStages < ActiveRecord::Migration +class CreateIndexInPipelineStages < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170526185901_remove_stage_id_index_from_builds.rb b/db/post_migrate/20170526185901_remove_stage_id_index_from_builds.rb index 3879cf9133b..de473e7bb91 100644 --- a/db/post_migrate/20170526185901_remove_stage_id_index_from_builds.rb +++ b/db/post_migrate/20170526185901_remove_stage_id_index_from_builds.rb @@ -1,4 +1,4 @@ -class RemoveStageIdIndexFromBuilds < ActiveRecord::Migration +class RemoveStageIdIndexFromBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170526185921_migrate_build_stage_reference.rb b/db/post_migrate/20170526185921_migrate_build_stage_reference.rb index 98c32d8284c..a9b392314fa 100644 --- a/db/post_migrate/20170526185921_migrate_build_stage_reference.rb +++ b/db/post_migrate/20170526185921_migrate_build_stage_reference.rb @@ -1,4 +1,4 @@ -class MigrateBuildStageReference < ActiveRecord::Migration +class MigrateBuildStageReference < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170526190000_migrate_build_stage_reference_again.rb b/db/post_migrate/20170526190000_migrate_build_stage_reference_again.rb index 97cb242415d..7fc2387595a 100644 --- a/db/post_migrate/20170526190000_migrate_build_stage_reference_again.rb +++ b/db/post_migrate/20170526190000_migrate_build_stage_reference_again.rb @@ -1,4 +1,4 @@ -class MigrateBuildStageReferenceAgain < ActiveRecord::Migration +class MigrateBuildStageReferenceAgain < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb b/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb index 15edb402b86..6dedefa8335 100644 --- a/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb +++ b/db/post_migrate/20170531203055_cleanup_users_ldap_email_rename.rb @@ -1,4 +1,4 @@ -class CleanupUsersLdapEmailRename < ActiveRecord::Migration +class CleanupUsersLdapEmailRename < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170606202615_move_appearance_to_system_dir.rb b/db/post_migrate/20170606202615_move_appearance_to_system_dir.rb index 07935ab8a52..fb9ac8d6daf 100644 --- a/db/post_migrate/20170606202615_move_appearance_to_system_dir.rb +++ b/db/post_migrate/20170606202615_move_appearance_to_system_dir.rb @@ -1,4 +1,4 @@ -class MoveAppearanceToSystemDir < ActiveRecord::Migration +class MoveAppearanceToSystemDir < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/post_migrate/20170607121233_convert_custom_notification_settings_to_columns.rb b/db/post_migrate/20170607121233_convert_custom_notification_settings_to_columns.rb index 9abda6a1d73..8ff26130cba 100644 --- a/db/post_migrate/20170607121233_convert_custom_notification_settings_to_columns.rb +++ b/db/post_migrate/20170607121233_convert_custom_notification_settings_to_columns.rb @@ -1,4 +1,4 @@ -class ConvertCustomNotificationSettingsToColumns < ActiveRecord::Migration +class ConvertCustomNotificationSettingsToColumns < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170609183112_remove_position_from_issuables.rb b/db/post_migrate/20170609183112_remove_position_from_issuables.rb index 4caaa2e83e8..edad0a502b4 100644 --- a/db/post_migrate/20170609183112_remove_position_from_issuables.rb +++ b/db/post_migrate/20170609183112_remove_position_from_issuables.rb @@ -1,4 +1,4 @@ -class RemovePositionFromIssuables < ActiveRecord::Migration +class RemovePositionFromIssuables < ActiveRecord::Migration[4.2] DOWNTIME = false def change diff --git a/db/post_migrate/20170612071012_move_personal_snippets_files.rb b/db/post_migrate/20170612071012_move_personal_snippets_files.rb index 2b79a87ccd8..7eb79cb004a 100644 --- a/db/post_migrate/20170612071012_move_personal_snippets_files.rb +++ b/db/post_migrate/20170612071012_move_personal_snippets_files.rb @@ -1,6 +1,6 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MovePersonalSnippetsFiles < ActiveRecord::Migration +class MovePersonalSnippetsFiles < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/post_migrate/20170613111224_clean_appearance_symlinks.rb b/db/post_migrate/20170613111224_clean_appearance_symlinks.rb index acb895e426f..b65c65a6f05 100644 --- a/db/post_migrate/20170613111224_clean_appearance_symlinks.rb +++ b/db/post_migrate/20170613111224_clean_appearance_symlinks.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class CleanAppearanceSymlinks < ActiveRecord::Migration +class CleanAppearanceSymlinks < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/post_migrate/20170621102400_add_stage_id_index_to_builds.rb b/db/post_migrate/20170621102400_add_stage_id_index_to_builds.rb index ac61b5c84a8..cca9b488547 100644 --- a/db/post_migrate/20170621102400_add_stage_id_index_to_builds.rb +++ b/db/post_migrate/20170621102400_add_stage_id_index_to_builds.rb @@ -1,4 +1,4 @@ -class AddStageIdIndexToBuilds < ActiveRecord::Migration +class AddStageIdIndexToBuilds < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170627101016_schedule_event_migrations.rb b/db/post_migrate/20170627101016_schedule_event_migrations.rb index 1f34375ff0d..edb4c0b8eb1 100644 --- a/db/post_migrate/20170627101016_schedule_event_migrations.rb +++ b/db/post_migrate/20170627101016_schedule_event_migrations.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class ScheduleEventMigrations < ActiveRecord::Migration +class ScheduleEventMigrations < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb b/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb index f31015d77a3..36aac3df071 100644 --- a/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb +++ b/db/post_migrate/20170628080858_migrate_stage_id_reference_in_background.rb @@ -1,4 +1,4 @@ -class MigrateStageIdReferenceInBackground < ActiveRecord::Migration +class MigrateStageIdReferenceInBackground < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170629180131_cleanup_application_settings_signin_enabled_rename.rb b/db/post_migrate/20170629180131_cleanup_application_settings_signin_enabled_rename.rb index 52a773ddfee..87268fb4b31 100644 --- a/db/post_migrate/20170629180131_cleanup_application_settings_signin_enabled_rename.rb +++ b/db/post_migrate/20170629180131_cleanup_application_settings_signin_enabled_rename.rb @@ -1,4 +1,4 @@ -class CleanupApplicationSettingsSigninEnabledRename < ActiveRecord::Migration +class CleanupApplicationSettingsSigninEnabledRename < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170703130158_schedule_merge_request_diff_migrations.rb b/db/post_migrate/20170703130158_schedule_merge_request_diff_migrations.rb index 17a9dc293f1..fd4b2859f7f 100644 --- a/db/post_migrate/20170703130158_schedule_merge_request_diff_migrations.rb +++ b/db/post_migrate/20170703130158_schedule_merge_request_diff_migrations.rb @@ -1,4 +1,4 @@ -class ScheduleMergeRequestDiffMigrations < ActiveRecord::Migration +class ScheduleMergeRequestDiffMigrations < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170711145558_migrate_stages_statuses.rb b/db/post_migrate/20170711145558_migrate_stages_statuses.rb index aeb900354db..43bf5f6fef9 100644 --- a/db/post_migrate/20170711145558_migrate_stages_statuses.rb +++ b/db/post_migrate/20170711145558_migrate_stages_statuses.rb @@ -1,4 +1,4 @@ -class MigrateStagesStatuses < ActiveRecord::Migration +class MigrateStagesStatuses < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb b/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb index 26b99b61424..6c374e458f9 100644 --- a/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb +++ b/db/post_migrate/20170717111152_cleanup_move_system_upload_folder_symlink.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class CleanupMoveSystemUploadFolderSymlink < ActiveRecord::Migration +class CleanupMoveSystemUploadFolderSymlink < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170717150329_enqueue_migrate_system_uploads_to_new_folder.rb b/db/post_migrate/20170717150329_enqueue_migrate_system_uploads_to_new_folder.rb index 87069dce006..fdd990ae2e5 100644 --- a/db/post_migrate/20170717150329_enqueue_migrate_system_uploads_to_new_folder.rb +++ b/db/post_migrate/20170717150329_enqueue_migrate_system_uploads_to_new_folder.rb @@ -1,4 +1,4 @@ -class EnqueueMigrateSystemUploadsToNewFolder < ActiveRecord::Migration +class EnqueueMigrateSystemUploadsToNewFolder < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170719150301_merge_issuable_reopened_into_opened_state.rb b/db/post_migrate/20170719150301_merge_issuable_reopened_into_opened_state.rb index acc0fc7a0ac..7af1d04f0cc 100644 --- a/db/post_migrate/20170719150301_merge_issuable_reopened_into_opened_state.rb +++ b/db/post_migrate/20170719150301_merge_issuable_reopened_into_opened_state.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MergeIssuableReopenedIntoOpenedState < ActiveRecord::Migration +class MergeIssuableReopenedIntoOpenedState < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170728101014_remove_events_from_notification_settings.rb b/db/post_migrate/20170728101014_remove_events_from_notification_settings.rb index cd533391d8d..f1b0a1daec5 100644 --- a/db/post_migrate/20170728101014_remove_events_from_notification_settings.rb +++ b/db/post_migrate/20170728101014_remove_events_from_notification_settings.rb @@ -1,4 +1,4 @@ -class RemoveEventsFromNotificationSettings < ActiveRecord::Migration +class RemoveEventsFromNotificationSettings < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170803090603_calculate_conv_dev_index_percentages.rb b/db/post_migrate/20170803090603_calculate_conv_dev_index_percentages.rb index 9af76c94bf3..a148586ca89 100644 --- a/db/post_migrate/20170803090603_calculate_conv_dev_index_percentages.rb +++ b/db/post_migrate/20170803090603_calculate_conv_dev_index_percentages.rb @@ -1,4 +1,4 @@ -class CalculateConvDevIndexPercentages < ActiveRecord::Migration +class CalculateConvDevIndexPercentages < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb b/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb index ea3d1fb3e02..6dc49211e5a 100644 --- a/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb +++ b/db/post_migrate/20170807160457_remove_locked_at_column_from_merge_requests.rb @@ -1,4 +1,4 @@ -class RemoveLockedAtColumnFromMergeRequests < ActiveRecord::Migration +class RemoveLockedAtColumnFromMergeRequests < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/post_migrate/20170807190736_move_personal_snippet_files_into_correct_folder.rb b/db/post_migrate/20170807190736_move_personal_snippet_files_into_correct_folder.rb index e3d2446b897..8341ac39c25 100644 --- a/db/post_migrate/20170807190736_move_personal_snippet_files_into_correct_folder.rb +++ b/db/post_migrate/20170807190736_move_personal_snippet_files_into_correct_folder.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class MovePersonalSnippetFilesIntoCorrectFolder < ActiveRecord::Migration +class MovePersonalSnippetFilesIntoCorrectFolder < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers disable_ddl_transaction! diff --git a/db/post_migrate/20170815060945_remove_duplicate_mr_events.rb b/db/post_migrate/20170815060945_remove_duplicate_mr_events.rb index 6132b553177..fdc126b8fd6 100644 --- a/db/post_migrate/20170815060945_remove_duplicate_mr_events.rb +++ b/db/post_migrate/20170815060945_remove_duplicate_mr_events.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveDuplicateMrEvents < ActiveRecord::Migration +class RemoveDuplicateMrEvents < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb b/db/post_migrate/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb index 3f085c17133..27656fd926d 100644 --- a/db/post_migrate/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb +++ b/db/post_migrate/20170816102555_cleanup_nonexisting_namespace_pending_delete_projects.rb @@ -1,7 +1,7 @@ # Follow up of CleanupNamespacelessPendingDeleteProjects and it cleans # all projects with `pending_delete = true` and for which the # namespace no longer exists. -class CleanupNonexistingNamespacePendingDeleteProjects < ActiveRecord::Migration +class CleanupNonexistingNamespacePendingDeleteProjects < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb b/db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb index 8441cfe7968..825bc9250bd 100644 --- a/db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb +++ b/db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb @@ -1,4 +1,4 @@ -class MigratePipelineSidekiqQueues < ActiveRecord::Migration +class MigratePipelineSidekiqQueues < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb b/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb index fd1437b07f5..533155aeb7a 100644 --- a/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb +++ b/db/post_migrate/20170828170502_post_deploy_migrate_user_external_mail_data.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class PostDeployMigrateUserExternalMailData < ActiveRecord::Migration +class PostDeployMigrateUserExternalMailData < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170828170513_remove_user_email_provider_column.rb b/db/post_migrate/20170828170513_remove_user_email_provider_column.rb index 570f2b3772a..bfc8aede540 100644 --- a/db/post_migrate/20170828170513_remove_user_email_provider_column.rb +++ b/db/post_migrate/20170828170513_remove_user_email_provider_column.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveUserEmailProviderColumn < ActiveRecord::Migration +class RemoveUserEmailProviderColumn < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170828170516_remove_user_external_mail_columns.rb b/db/post_migrate/20170828170516_remove_user_external_mail_columns.rb index bb81dc682b3..0104955e5c8 100644 --- a/db/post_migrate/20170828170516_remove_user_external_mail_columns.rb +++ b/db/post_migrate/20170828170516_remove_user_external_mail_columns.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class RemoveUserExternalMailColumns < ActiveRecord::Migration +class RemoveUserExternalMailColumns < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170830084744_destroy_gpg_signatures.rb b/db/post_migrate/20170830084744_destroy_gpg_signatures.rb index b04d36f6537..2945eb9fde6 100644 --- a/db/post_migrate/20170830084744_destroy_gpg_signatures.rb +++ b/db/post_migrate/20170830084744_destroy_gpg_signatures.rb @@ -1,4 +1,4 @@ -class DestroyGpgSignatures < ActiveRecord::Migration +class DestroyGpgSignatures < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/post_migrate/20170830150306_drop_events_for_migration_table.rb b/db/post_migrate/20170830150306_drop_events_for_migration_table.rb index 763ee9a810d..774f4e54087 100644 --- a/db/post_migrate/20170830150306_drop_events_for_migration_table.rb +++ b/db/post_migrate/20170830150306_drop_events_for_migration_table.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class DropEventsForMigrationTable < ActiveRecord::Migration +class DropEventsForMigrationTable < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170831195038_remove_valid_signature_from_gpg_signatures.rb b/db/post_migrate/20170831195038_remove_valid_signature_from_gpg_signatures.rb index 9b6745e33d9..8e264c1ab41 100644 --- a/db/post_migrate/20170831195038_remove_valid_signature_from_gpg_signatures.rb +++ b/db/post_migrate/20170831195038_remove_valid_signature_from_gpg_signatures.rb @@ -1,4 +1,4 @@ -class RemoveValidSignatureFromGpgSignatures < ActiveRecord::Migration +class RemoveValidSignatureFromGpgSignatures < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb b/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb index 3e84b295be4..dff3adec4be 100644 --- a/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb +++ b/db/post_migrate/20170907170235_delete_conflicting_redirect_routes.rb @@ -1,7 +1,7 @@ # See http://doc.gitlab.com/ce/development/migration_style_guide.html # for more information on how to write migrations for GitLab. -class DeleteConflictingRedirectRoutes < ActiveRecord::Migration +class DeleteConflictingRedirectRoutes < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170913180600_fix_projects_without_project_feature.rb b/db/post_migrate/20170913180600_fix_projects_without_project_feature.rb index bfa9ad80c7d..bbc624ac7c0 100644 --- a/db/post_migrate/20170913180600_fix_projects_without_project_feature.rb +++ b/db/post_migrate/20170913180600_fix_projects_without_project_feature.rb @@ -1,4 +1,4 @@ -class FixProjectsWithoutProjectFeature < ActiveRecord::Migration +class FixProjectsWithoutProjectFeature < ActiveRecord::Migration[4.2] DOWNTIME = false def up diff --git a/db/post_migrate/20170926150348_schedule_merge_request_diff_migrations_take_two.rb b/db/post_migrate/20170926150348_schedule_merge_request_diff_migrations_take_two.rb index 5732cb85ea5..9b675a51725 100644 --- a/db/post_migrate/20170926150348_schedule_merge_request_diff_migrations_take_two.rb +++ b/db/post_migrate/20170926150348_schedule_merge_request_diff_migrations_take_two.rb @@ -1,4 +1,4 @@ -class ScheduleMergeRequestDiffMigrationsTakeTwo < ActiveRecord::Migration +class ScheduleMergeRequestDiffMigrationsTakeTwo < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170927112318_update_legacy_diff_notes_type_for_import.rb b/db/post_migrate/20170927112318_update_legacy_diff_notes_type_for_import.rb index a238216253b..3a9b3076e7b 100644 --- a/db/post_migrate/20170927112318_update_legacy_diff_notes_type_for_import.rb +++ b/db/post_migrate/20170927112318_update_legacy_diff_notes_type_for_import.rb @@ -1,4 +1,4 @@ -class UpdateLegacyDiffNotesTypeForImport < ActiveRecord::Migration +class UpdateLegacyDiffNotesTypeForImport < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false diff --git a/db/post_migrate/20170927112319_update_notes_type_for_import.rb b/db/post_migrate/20170927112319_update_notes_type_for_import.rb index 1e70acd9868..e1615ff710a 100644 --- a/db/post_migrate/20170927112319_update_notes_type_for_import.rb +++ b/db/post_migrate/20170927112319_update_notes_type_for_import.rb @@ -1,4 +1,4 @@ -class UpdateNotesTypeForImport < ActiveRecord::Migration +class UpdateNotesTypeForImport < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers DOWNTIME = false |