diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170222111732_create_gpg_keys.rb | 4 | ||||
-rw-r--r-- | db/migrate/20170613154149_create_gpg_signatures.rb | 5 | ||||
-rw-r--r-- | db/migrate/limits_to_mysql.rb | 4 | ||||
-rw-r--r-- | db/schema.rb | 8 |
4 files changed, 13 insertions, 8 deletions
diff --git a/db/migrate/20170222111732_create_gpg_keys.rb b/db/migrate/20170222111732_create_gpg_keys.rb index 55dc730e884..7591238311f 100644 --- a/db/migrate/20170222111732_create_gpg_keys.rb +++ b/db/migrate/20170222111732_create_gpg_keys.rb @@ -7,8 +7,8 @@ class CreateGpgKeys < ActiveRecord::Migration t.references :user, index: true, foreign_key: true - t.string :fingerprint - t.string :primary_keyid + t.binary :primary_keyid, limit: Gitlab::Database.mysql? ? 20 : nil + t.binary :fingerprint, limit: Gitlab::Database.mysql? ? 20 : nil t.text :key diff --git a/db/migrate/20170613154149_create_gpg_signatures.rb b/db/migrate/20170613154149_create_gpg_signatures.rb index 515c1413cf4..c5478551e11 100644 --- a/db/migrate/20170613154149_create_gpg_signatures.rb +++ b/db/migrate/20170613154149_create_gpg_signatures.rb @@ -10,8 +10,9 @@ class CreateGpgSignatures < ActiveRecord::Migration t.boolean :valid_signature - t.string :commit_sha - t.string :gpg_key_primary_keyid + t.binary :commit_sha, limit: Gitlab::Database.mysql? ? 20 : nil + t.binary :gpg_key_primary_keyid, limit: Gitlab::Database.mysql? ? 20 : nil + t.string :gpg_key_user_name t.string :gpg_key_user_email diff --git a/db/migrate/limits_to_mysql.rb b/db/migrate/limits_to_mysql.rb index be3501c4c2e..de1288e6410 100644 --- a/db/migrate/limits_to_mysql.rb +++ b/db/migrate/limits_to_mysql.rb @@ -8,5 +8,9 @@ class LimitsToMysql < ActiveRecord::Migration change_column :snippets, :content, :text, limit: 2147483647 change_column :notes, :st_diff, :text, limit: 2147483647 change_column :events, :data, :text, limit: 2147483647 + change_column :gpg_keys, :primary_keyid, :binary, limit: 20 + change_column :gpg_keys, :fingerprint, :binary, limit: 20 + change_column :gpg_signatures, :commit_sha, :binary, limit: 20 + change_column :gpg_signatures, :gpg_key_primary_keyid, :binary, limit: 20 end end diff --git a/db/schema.rb b/db/schema.rb index f413aaa41cd..68b5963ec14 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -544,8 +544,8 @@ ActiveRecord::Schema.define(version: 20170725145659) do t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "user_id" - t.string "fingerprint" - t.string "primary_keyid" + t.binary "primary_keyid" + t.binary "fingerprint" t.text "key" end @@ -558,8 +558,8 @@ ActiveRecord::Schema.define(version: 20170725145659) do t.integer "project_id" t.integer "gpg_key_id" t.boolean "valid_signature" - t.string "commit_sha" - t.string "gpg_key_primary_keyid" + t.binary "commit_sha" + t.binary "gpg_key_primary_keyid" t.string "gpg_key_user_name" t.string "gpg_key_user_email" end |