Allow user to creates named auth keys with token

This commit is contained in:
Thibault Jouan
2015-05-04 04:34:13 +00:00
parent 7d1274cbb3
commit 763c9789ec
12 changed files with 174 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
class CreateKeys < ActiveRecord::Migration
def change
create_table :keys do |t|
t.timestamps null: false
t.references :user, index: true, foreign_key: true, null: false
t.string :name
t.string :token
end
add_index :keys, :token, unique: true
end
end