diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-02-22 12:49:17 +0100 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 15:40:40 +0200 |
commit | fbf1fd1a204a24aef2b80473ec64a520ed2a2dfc (patch) | |
tree | eb1656bf0a16ab379b1ac1a5cd8cf86bf771b0c1 /db | |
parent | 28bb5e3d53a585b1fb958d1d91622da0a038bea8 (diff) | |
download | gitlab-ce-fbf1fd1a204a24aef2b80473ec64a520ed2a2dfc.tar.gz |
add gpg key model
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170222111732_create_gpg_keys.rb | 13 | ||||
-rw-r--r-- | db/schema.rb | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/db/migrate/20170222111732_create_gpg_keys.rb b/db/migrate/20170222111732_create_gpg_keys.rb new file mode 100644 index 00000000000..1b8b7a91fe1 --- /dev/null +++ b/db/migrate/20170222111732_create_gpg_keys.rb @@ -0,0 +1,13 @@ +class CreateGpgKeys < ActiveRecord::Migration + DOWNTIME = false + + def change + create_table :gpg_keys do |t| + t.string :fingerprint + t.text :key + t.references :user, index: true, foreign_key: true + + t.timestamps_with_timezone null: false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 1ec25c7d46f..54f98559243 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -540,6 +540,16 @@ ActiveRecord::Schema.define(version: 20170725145659) do add_index "forked_project_links", ["forked_to_project_id"], name: "index_forked_project_links_on_forked_to_project_id", unique: true, using: :btree + create_table "gpg_keys", force: :cascade do |t| + t.string "fingerprint" + t.text "key" + t.integer "user_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "gpg_keys", ["user_id"], name: "index_gpg_keys_on_user_id", using: :btree + create_table "identities", force: :cascade do |t| t.string "extern_uid" t.string "provider" @@ -1602,6 +1612,7 @@ ActiveRecord::Schema.define(version: 20170725145659) do add_foreign_key "environments", "projects", name: "fk_d1c8c1da6a", on_delete: :cascade add_foreign_key "events", "projects", name: "fk_0434b48643", on_delete: :cascade add_foreign_key "forked_project_links", "projects", column: "forked_to_project_id", name: "fk_434510edb0", on_delete: :cascade + add_foreign_key "gpg_keys", "users" add_foreign_key "issue_assignees", "issues", name: "fk_b7d881734a", on_delete: :cascade add_foreign_key "issue_assignees", "users", name: "fk_5e0c8d9154", on_delete: :cascade add_foreign_key "issue_metrics", "issues", on_delete: :cascade |