diff options
author | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-04-06 00:37:39 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-07 05:20:16 +0300 |
commit | 6b2954ec8a2e17c913872c32386cb2b08f2db1c2 (patch) | |
tree | 5f29317c20cf7a6f04c24a7aa5ab473b053728bc /db/migrate/20180319190020_create_deploy_tokens.rb | |
parent | 8315861c9a50675b4f4f4ca536f0da90f27994f3 (diff) |
Fix and optimise DB schema
Diffstat (limited to 'db/migrate/20180319190020_create_deploy_tokens.rb')
-rw-r--r-- | db/migrate/20180319190020_create_deploy_tokens.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/db/migrate/20180319190020_create_deploy_tokens.rb b/db/migrate/20180319190020_create_deploy_tokens.rb index dfe85b3b552..6a681ba79d6 100644 --- a/db/migrate/20180319190020_create_deploy_tokens.rb +++ b/db/migrate/20180319190020_create_deploy_tokens.rb @@ -3,14 +3,15 @@ class CreateDeployTokens < ActiveRecord::Migration def change create_table :deploy_tokens do |t| - t.string :name, null: false - t.string :token, index: { unique: true }, null: false - t.boolean :read_repository, default: false - t.boolean :read_registry, default: false t.boolean :revoked, default: false - t.datetime :expires_at + t.boolean :read_repository, null: false, default: false + t.boolean :read_registry, null: false, default: false + t.datetime :expires_at t.timestamps null: false + + t.string :name, null: false + t.string :token, index: { unique: true }, null: false end end end |