2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/authpwn_rails/generators/templates/003_create_credentials.rb', line 2
def change
create_table :credentials do |t|
t.references :user, null: false, index: false, foreign_key: true
t.string :type, limit: 32, null: false
t.string :name, limit: 128, null: true
t.timestamp :updated_at, null: false
t.binary :key, limit: 2.kilobytes, null: true
t.index [:user_id, :type], unique: false
t.index [:type, :name], unique: true
t.index [:type, :updated_at], unique: false
end
end
|