2017-06-14 07:17:34 +00:00
|
|
|
class CreateGpgSignatures < ActiveRecord::Migration
|
|
|
|
DOWNTIME = false
|
|
|
|
|
2017-07-15 13:25:21 +00:00
|
|
|
def change
|
2017-06-14 07:17:34 +00:00
|
|
|
create_table :gpg_signatures do |t|
|
2017-07-15 13:25:21 +00:00
|
|
|
t.timestamps_with_timezone null: false
|
|
|
|
|
2017-07-20 14:33:44 +00:00
|
|
|
t.references :project, index: true, foreign_key: { on_delete: :cascade }
|
|
|
|
t.references :gpg_key, index: true, foreign_key: { on_delete: :nullify }
|
2017-06-14 07:17:34 +00:00
|
|
|
|
2017-07-15 13:25:21 +00:00
|
|
|
t.boolean :valid_signature
|
2017-06-14 07:17:34 +00:00
|
|
|
|
2017-07-20 20:07:04 +00:00
|
|
|
t.binary :commit_sha
|
|
|
|
t.binary :gpg_key_primary_keyid
|
2017-07-20 13:44:15 +00:00
|
|
|
|
2017-07-20 14:11:53 +00:00
|
|
|
t.text :gpg_key_user_name
|
|
|
|
t.text :gpg_key_user_email
|
2017-06-14 07:17:34 +00:00
|
|
|
|
2017-07-20 20:07:04 +00:00
|
|
|
t.index :commit_sha, length: Gitlab::Database.mysql? ? 20 : nil
|
|
|
|
t.index :gpg_key_primary_keyid, length: Gitlab::Database.mysql? ? 20 : nil
|
2017-07-15 13:25:21 +00:00
|
|
|
end
|
2017-06-14 07:17:34 +00:00
|
|
|
end
|
|
|
|
end
|