diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-04-10 11:23:28 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2017-04-11 20:20:19 +0100 |
commit | c41df67676c46c09642a0437c5b915ca4f93a521 (patch) | |
tree | af9a63917471525006c4c7866b58d2656846e251 /db | |
parent | 069c54a7d7a1d1d6ec1dc48c4212139eff6735df (diff) | |
download | gitlab-ce-c41df67676c46c09642a0437c5b915ca4f93a521.tar.gz |
removes redundant code from database.rb29056-backport-ee-cleanup-database-file
Diffstat (limited to 'db')
12 files changed, 11 insertions, 12 deletions
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 94c0a6845d5..67a0d3b53eb 100644 --- a/db/migrate/20130218141258_convert_closed_to_state_in_issue.rb +++ b/db/migrate/20130218141258_convert_closed_to_state_in_issue.rb @@ -1,6 +1,6 @@ # rubocop:disable all class ConvertClosedToStateInIssue < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def up execute "UPDATE #{table_name} SET state = 'closed' WHERE closed = #{true_value}" 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 64a9c761352..307fc6a023d 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,6 +1,6 @@ # rubocop:disable all class ConvertClosedToStateInMergeRequest < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def up execute "UPDATE #{table_name} SET state = 'merged' WHERE closed = #{true_value} AND merged = #{true_value}" 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 41508c2dc95..d12703cf3b2 100644 --- a/db/migrate/20130218141344_convert_closed_to_state_in_milestone.rb +++ b/db/migrate/20130218141344_convert_closed_to_state_in_milestone.rb @@ -1,6 +1,6 @@ # rubocop:disable all class ConvertClosedToStateInMilestone < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def up execute "UPDATE #{table_name} SET state = 'closed' WHERE closed = #{true_value}" diff --git a/db/migrate/20130315124931_user_color_scheme.rb b/db/migrate/20130315124931_user_color_scheme.rb index 06e28a49d9d..09af928fde7 100644 --- a/db/migrate/20130315124931_user_color_scheme.rb +++ b/db/migrate/20130315124931_user_color_scheme.rb @@ -1,6 +1,6 @@ # rubocop:disable all class UserColorScheme < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def up add_column :users, :color_scheme_id, :integer, null: false, default: 1 diff --git a/db/migrate/20131112220935_add_visibility_level_to_projects.rb b/db/migrate/20131112220935_add_visibility_level_to_projects.rb index 5efc17b228e..86d73753adc 100644 --- a/db/migrate/20131112220935_add_visibility_level_to_projects.rb +++ b/db/migrate/20131112220935_add_visibility_level_to_projects.rb @@ -1,6 +1,6 @@ # rubocop:disable all class AddVisibilityLevelToProjects < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def self.up add_column :projects, :visibility_level, :integer, :default => 0, :null => false diff --git a/db/migrate/20140313092127_migrate_already_imported_projects.rb b/db/migrate/20140313092127_migrate_already_imported_projects.rb index f2e91fe1b40..0afc26b8764 100644 --- a/db/migrate/20140313092127_migrate_already_imported_projects.rb +++ b/db/migrate/20140313092127_migrate_already_imported_projects.rb @@ -1,6 +1,6 @@ # rubocop:disable all class MigrateAlreadyImportedProjects < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def up execute("UPDATE projects SET import_status = 'finished' WHERE imported = #{true_value}") diff --git a/db/migrate/20141007100818_add_visibility_level_to_snippet.rb b/db/migrate/20141007100818_add_visibility_level_to_snippet.rb index 688d8578478..0c14f75c154 100644 --- a/db/migrate/20141007100818_add_visibility_level_to_snippet.rb +++ b/db/migrate/20141007100818_add_visibility_level_to_snippet.rb @@ -1,6 +1,6 @@ # rubocop:disable all class AddVisibilityLevelToSnippet < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def up add_column :snippets, :visibility_level, :integer, :default => 0, :null => false diff --git a/db/migrate/20151209144329_migrate_ci_web_hooks.rb b/db/migrate/20151209144329_migrate_ci_web_hooks.rb index cb1e556623a..62a6d334f04 100644 --- a/db/migrate/20151209144329_migrate_ci_web_hooks.rb +++ b/db/migrate/20151209144329_migrate_ci_web_hooks.rb @@ -1,6 +1,6 @@ # rubocop:disable all class MigrateCiWebHooks < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def up execute( diff --git a/db/migrate/20151209145909_migrate_ci_emails.rb b/db/migrate/20151209145909_migrate_ci_emails.rb index 6b7a106814d..5de7b205fb1 100644 --- a/db/migrate/20151209145909_migrate_ci_emails.rb +++ b/db/migrate/20151209145909_migrate_ci_emails.rb @@ -1,6 +1,6 @@ # rubocop:disable all class MigrateCiEmails < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def up # This inserts a new service: BuildsEmailService diff --git a/db/migrate/20151210125232_migrate_ci_slack_service.rb b/db/migrate/20151210125232_migrate_ci_slack_service.rb index 633d5148d97..fff130b7b10 100644 --- a/db/migrate/20151210125232_migrate_ci_slack_service.rb +++ b/db/migrate/20151210125232_migrate_ci_slack_service.rb @@ -1,6 +1,6 @@ # rubocop:disable all class MigrateCiSlackService < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def up properties_query = 'SELECT properties FROM ci_services ' \ diff --git a/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb b/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb index dae084ce180..824f6f84195 100644 --- a/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb +++ b/db/migrate/20151210125927_migrate_ci_hip_chat_service.rb @@ -1,6 +1,6 @@ # rubocop:disable all class MigrateCiHipChatService < ActiveRecord::Migration - include Gitlab::Database + include Gitlab::Database::MigrationHelpers def up # From properties strip `hipchat_` key 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 2dd14ee5a78..04bf89c9687 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,6 +1,5 @@ class MigrateBuildEventsToPipelineEvents < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers - include Gitlab::Database DOWNTIME = false |