summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorMayra Cabrera <mcabrera@gitlab.com>2018-03-19 10:11:12 -0600
committerMayra Cabrera <mcabrera@gitlab.com>2018-04-06 21:20:16 -0500
commitdb18993f652425b72c4b854e18a002e0ec44b196 (patch)
tree7466e5f6b154bd79e72c13a5021d92eb9d7e4a13 /db/migrate
parentaade8b3652573db40e7b777c72caa922b0bc12ef (diff)
downloadgitlab-ce-db18993f652425b72c4b854e18a002e0ec44b196.tar.gz
Create barebones for Deploytoken
Includes: - Model, factories, create service and controller actions - As usual, includes specs for everything - Builds UI (copy from PAT) - Add revoke action Closes #31591
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180319190020_create_deploy_tokens.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20180319190020_create_deploy_tokens.rb b/db/migrate/20180319190020_create_deploy_tokens.rb
new file mode 100644
index 00000000000..53808300fc1
--- /dev/null
+++ b/db/migrate/20180319190020_create_deploy_tokens.rb
@@ -0,0 +1,16 @@
+class CreateDeployTokens < ActiveRecord::Migration
+ DOWNTIME = false
+
+ def change
+ create_table :deploy_tokens do |t|
+ t.references :project, index: true, foreign_key: true, null: false
+ t.string :name, null: false
+ t.string :token, index: { unique: true }, null: false
+ t.string :scopes
+ t.boolean :revoked, default: false
+ t.datetime :expires_at
+
+ t.timestamps null: false
+ end
+ end
+end