Class: CreateActiveStorageImgurKeyMappings

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/active_storage_imgur/templates/create_active_storage_imgur_key_mappings.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
# File 'lib/generators/active_storage_imgur/templates/create_active_storage_imgur_key_mappings.rb', line 2

def change
  create_table :active_storage_imgur_key_mappings do |t|
    t.string   :key,        null: false
    t.string   :imgur_id,   null: false
    t.index [ :key ], unique: true
  end
end