diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-25 18:48:58 +0200 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-09-25 18:48:58 +0200 |
commit | 142bbd900b791478b2ad473efc8e0f78a7afe00d (patch) | |
tree | c93aa1cf9dbd53da3a5b7dd008509678490951eb /db | |
parent | fea7b9e68255771a308e9d391079d83c58340814 (diff) | |
parent | b83dcd3a30539f86b13d91ffd24fb708652eae80 (diff) | |
download | gitlab-ce-142bbd900b791478b2ad473efc8e0f78a7afe00d.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into 18608-lock-issues
# Conflicts:
# app/assets/javascripts/notes/components/issue_comment_form.vue
Diffstat (limited to 'db')
4 files changed, 23 insertions, 3 deletions
diff --git a/db/migrate/20170828135939_migrate_user_external_mail_data.rb b/db/migrate/20170828135939_migrate_user_external_mail_data.rb index 592e141b7e6..f7ac87374b6 100644 --- a/db/migrate/20170828135939_migrate_user_external_mail_data.rb +++ b/db/migrate/20170828135939_migrate_user_external_mail_data.rb @@ -33,7 +33,7 @@ class MigrateUserExternalMailData < ActiveRecord::Migration SELECT true FROM user_synced_attributes_metadata WHERE user_id = users.id - AND provider = users.email_provider + AND (provider = users.email_provider OR (provider IS NULL AND users.email_provider IS NULL)) ) AND id BETWEEN #{start_id} AND #{end_id} EOF diff --git a/db/migrate/20170921115009_add_project_repository_storage_index.rb b/db/migrate/20170921115009_add_project_repository_storage_index.rb new file mode 100644 index 00000000000..1c5a8fd65e1 --- /dev/null +++ b/db/migrate/20170921115009_add_project_repository_storage_index.rb @@ -0,0 +1,19 @@ +class AddProjectRepositoryStorageIndex < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index(*index_spec) unless index_exists?(*index_spec) + end + + def down + remove_concurrent_index(*index_spec) if index_exists?(*index_spec) + end + + def index_spec + [:projects, :repository_storage] + end +end 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 fefd931e5d2..fd1437b07f5 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 @@ -33,7 +33,7 @@ class PostDeployMigrateUserExternalMailData < ActiveRecord::Migration SELECT true FROM user_synced_attributes_metadata WHERE user_id = users.id - AND provider = users.email_provider + AND (provider = users.email_provider OR (provider IS NULL AND users.email_provider IS NULL)) ) AND id BETWEEN #{start_id} AND #{end_id} EOF diff --git a/db/schema.rb b/db/schema.rb index 0d9fb5349b1..c93fe7bea73 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170918223303) do +ActiveRecord::Schema.define(version: 20170921115009) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -1232,6 +1232,7 @@ ActiveRecord::Schema.define(version: 20170918223303) do add_index "projects", ["path"], name: "index_projects_on_path", using: :btree add_index "projects", ["path"], name: "index_projects_on_path_trigram", using: :gin, opclasses: {"path"=>"gin_trgm_ops"} add_index "projects", ["pending_delete"], name: "index_projects_on_pending_delete", using: :btree + add_index "projects", ["repository_storage"], name: "index_projects_on_repository_storage", using: :btree add_index "projects", ["runners_token"], name: "index_projects_on_runners_token", using: :btree add_index "projects", ["star_count"], name: "index_projects_on_star_count", using: :btree add_index "projects", ["visibility_level"], name: "index_projects_on_visibility_level", using: :btree |