diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-01-09 23:10:29 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-01-09 23:10:29 +0300 |
commit | 4beae79376923529dfffbea76988a1f22e6f49dd (patch) | |
tree | 2a53a114a66a88495ba901335cbc2bb23ef37709 /db | |
parent | c8f53f0e14ca05ca3326e92fb2b71d2d8dfd5daa (diff) | |
parent | de321fbbb55dab5bee8dc344d458230b74570d5d (diff) |
Merge branch 'remove-project-authorizations-id-column' into 'master'
Remove the project_authorizations.id column
See merge request !8479
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb | 12 | ||||
-rw-r--r-- | db/schema.rb | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb b/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb new file mode 100644 index 00000000000..7c788160022 --- /dev/null +++ b/db/post_migrate/20170106172224_remove_project_authorizations_id_column.rb @@ -0,0 +1,12 @@ +# 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 + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + remove_column :project_authorizations, :id, :primary_key + end +end diff --git a/db/schema.rb b/db/schema.rb index 9bce3b82d82..f3bf7ced393 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: 20161227192806) do +ActiveRecord::Schema.define(version: 20170106172224) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -862,7 +862,7 @@ ActiveRecord::Schema.define(version: 20161227192806) do add_index "personal_access_tokens", ["token"], name: "index_personal_access_tokens_on_token", unique: true, using: :btree add_index "personal_access_tokens", ["user_id"], name: "index_personal_access_tokens_on_user_id", using: :btree - create_table "project_authorizations", force: :cascade do |t| + create_table "project_authorizations", id: false, force: :cascade do |t| t.integer "user_id" t.integer "project_id" t.integer "access_level" @@ -1307,4 +1307,4 @@ ActiveRecord::Schema.define(version: 20161227192806) do add_foreign_key "subscriptions", "projects", on_delete: :cascade add_foreign_key "trending_projects", "projects", on_delete: :cascade add_foreign_key "u2f_registrations", "users" -end
\ No newline at end of file +end |