diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-28 16:03:03 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-28 16:03:03 +0100 |
commit | 3a3cf07f93b6b902f9a8a3ebb6dfeb6eaf12ae18 (patch) | |
tree | 116a816924013a0babc411ceb57ad3aa56ce6fc4 /db | |
parent | 97633d561681a5c0f55472c1372bedca5fe3bffe (diff) | |
parent | 61046e75d8e6f660e55f4f7b5a76238611a0f48f (diff) | |
download | gitlab-ce-3a3cf07f93b6b902f9a8a3ebb6dfeb6eaf12ae18.tar.gz |
Merge remote-tracking branch 'origin/master' into add-sentry-js-again-with-vue
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170421102337_remove_nil_type_services.rb | 12 | ||||
-rw-r--r-- | db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb | 10 | ||||
-rw-r--r-- | db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb | 19 | ||||
-rw-r--r-- | db/schema.rb | 4 |
4 files changed, 45 insertions, 0 deletions
diff --git a/db/migrate/20170421102337_remove_nil_type_services.rb b/db/migrate/20170421102337_remove_nil_type_services.rb new file mode 100644 index 00000000000..b835b9c6ed9 --- /dev/null +++ b/db/migrate/20170421102337_remove_nil_type_services.rb @@ -0,0 +1,12 @@ +class RemoveNilTypeServices < ActiveRecord::Migration + DOWNTIME = false + + def up + execute <<-SQL + DELETE FROM services WHERE type IS NULL OR type = ''; + SQL + end + + def down + end +end diff --git a/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb b/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb new file mode 100644 index 00000000000..58ad2c64075 --- /dev/null +++ b/db/migrate/20170426175636_fill_missing_uuid_on_application_settings.rb @@ -0,0 +1,10 @@ +class FillMissingUuidOnApplicationSettings < ActiveRecord::Migration + DOWNTIME = false + + def up + execute("UPDATE application_settings SET uuid = #{quote(SecureRandom.uuid)} WHERE uuid is NULL") + end + + def down + end +end 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 new file mode 100644 index 00000000000..879825a1934 --- /dev/null +++ b/db/migrate/20170426181740_add_index_on_ci_runners_contacted_at.rb @@ -0,0 +1,19 @@ +# 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 + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :ci_runners, :contacted_at + end + + def down + remove_concurrent_index :ci_runners, :contacted_at if index_exists?(:ci_runners, :contacted_at) + end +end diff --git a/db/schema.rb b/db/schema.rb index a9940be22ff..81cd32e2d83 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,11 @@ # # It's strongly recommended that you check this file into your version control system. +<<<<<<< HEAD ActiveRecord::Schema.define(version: 20170428123910) do +======= +ActiveRecord::Schema.define(version: 20170426181740) do +>>>>>>> origin/master # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" |