diff options
author | ZJ van de Weg <zegerjan@gitlab.com> | 2016-05-30 14:46:23 +0200 |
---|---|---|
committer | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-05-30 18:54:08 +0200 |
commit | cbd7801b3d1d435a95ec70032c5acc9df33b0337 (patch) | |
tree | 7bd367bf31690e4a6b0115d238cf2c312c9fb2ab /db | |
parent | f99b38c9d5dab11677b2680a671c1a66fb69283b (diff) | |
parent | 2485bd7bbf9686f993d2a417943feff5c7d5b6f3 (diff) | |
download | gitlab-ce-cbd7801b3d1d435a95ec70032c5acc9df33b0337.tar.gz |
Merge branch 'master' into awardables
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb | 2 | ||||
-rw-r--r-- | db/migrate/20160525205328_remove_main_language_from_projects.rb | 21 | ||||
-rw-r--r-- | db/migrate/20160528043124_add_users_state_index.rb | 9 | ||||
-rw-r--r-- | db/schema.rb | 4 |
4 files changed, 33 insertions, 3 deletions
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 561c18a5776..6aed0fe03d2 100644 --- a/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb +++ b/db/migrate/20160302152808_remove_wrong_import_url_from_projects.rb @@ -28,7 +28,7 @@ class RemoveWrongImportUrlFromProjects < ActiveRecord::Migration update_import_url(import_url, project) update_import_data(import_url, project) - rescue URI::InvalidURIError + rescue Addressable::URI::InvalidURIError nullify_import_url(project) end end diff --git a/db/migrate/20160525205328_remove_main_language_from_projects.rb b/db/migrate/20160525205328_remove_main_language_from_projects.rb new file mode 100644 index 00000000000..0f9d60c385f --- /dev/null +++ b/db/migrate/20160525205328_remove_main_language_from_projects.rb @@ -0,0 +1,21 @@ +# 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 + include Gitlab::Database::MigrationHelpers + + # When using the methods "add_concurrent_index" or "add_column_with_default" + # you must disable the use of transactions as these methods can not run in an + # existing transaction. When using "add_concurrent_index" make sure that this + # method is the _only_ method called in the migration, any other changes + # should go in a separate migration. This ensures that upon failure _only_ the + # index creation fails and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + remove_column :projects, :main_language + end +end diff --git a/db/migrate/20160528043124_add_users_state_index.rb b/db/migrate/20160528043124_add_users_state_index.rb new file mode 100644 index 00000000000..e77a5460737 --- /dev/null +++ b/db/migrate/20160528043124_add_users_state_index.rb @@ -0,0 +1,9 @@ +class AddUsersStateIndex < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + def change + add_concurrent_index :users, :state + end +end diff --git a/db/schema.rb b/db/schema.rb index 4127b7a47e9..9ef68efc4e5 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: 20160516174813) do +ActiveRecord::Schema.define(version: 20160528043124) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -771,7 +771,6 @@ ActiveRecord::Schema.define(version: 20160516174813) do t.integer "build_timeout", default: 3600, null: false t.boolean "pending_delete", default: false t.boolean "public_builds", default: true, null: false - t.string "main_language" t.integer "pushes_since_gc", default: 0 t.boolean "last_repository_check_failed" t.datetime "last_repository_check_at" @@ -1012,6 +1011,7 @@ ActiveRecord::Schema.define(version: 20160516174813) do add_index "users", ["name"], name: "index_users_on_name", using: :btree add_index "users", ["name"], name: "index_users_on_name_trigram", using: :gin, opclasses: {"name"=>"gin_trgm_ops"} add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree + add_index "users", ["state"], name: "index_users_on_state", using: :btree add_index "users", ["username"], name: "index_users_on_username", using: :btree add_index "users", ["username"], name: "index_users_on_username_trigram", using: :gin, opclasses: {"username"=>"gin_trgm_ops"} |