Class: CreateProducts
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateProducts
- Defined in:
- lib/generators/fetch/products/templates/create_products.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/generators/fetch/products/templates/create_products.rb', line 2 def change create_table :products do |t| t.string :scope t.string :key t.text :data t. end add_index :products, [:scope, :key], unique: true end |