summaryrefslogtreecommitdiff
path: root/db/migrate/20160415062917_create_personal_access_tokens.rb
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-04-15 13:06:44 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-04-28 22:28:36 +0530
commit3a609038748055a27c7e01cf4b55d8249709c9cc (patch)
treeb6ec5626549f2c423b958b8ebc3c08061388a4ca /db/migrate/20160415062917_create_personal_access_tokens.rb
parent973b948b9e9553a57113983fa4e32207b581e0ad (diff)
downloadgitlab-ce-3a609038748055a27c7e01cf4b55d8249709c9cc.tar.gz
Allow creating Personal Access Tokens through the website.
Diffstat (limited to 'db/migrate/20160415062917_create_personal_access_tokens.rb')
-rw-r--r--db/migrate/20160415062917_create_personal_access_tokens.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20160415062917_create_personal_access_tokens.rb b/db/migrate/20160415062917_create_personal_access_tokens.rb
new file mode 100644
index 00000000000..42a41349a0c
--- /dev/null
+++ b/db/migrate/20160415062917_create_personal_access_tokens.rb
@@ -0,0 +1,11 @@
+class CreatePersonalAccessTokens < ActiveRecord::Migration
+ def change
+ create_table :personal_access_tokens do |t|
+ t.references :user, index: true, foreign_key: true, null: false
+ t.string :token, index: {unique: true}, null: false
+ t.string :name, null: false
+
+ t.timestamps null: false
+ end
+ end
+end