Class: CreateAk4rApiKey
- Inherits:
-
Object
- Object
- CreateAk4rApiKey
- Defined in:
- lib/generators/templates/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
16 17 18 |
# File 'lib/generators/templates/migration.rb', line 16 def self.down drop_table :ak4r_api_keys end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/templates/migration.rb', line 2 def self.up create_table :ak4r_api_keys do |t| t.string :name t.string :prefix t.string :key_hash t.string :scopes, array: true t. :valid_until t. end add_index :ak4r_api_keys, :prefix add_index :ak4r_api_keys, :key_hash end |