Class: CreateShops
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateShops
- Defined in:
- lib/generators/shopify_app/shop_model/templates/db/migrate/create_shops.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
12 13 14 |
# File 'lib/generators/shopify_app/shop_model/templates/db/migrate/create_shops.rb', line 12 def self.down drop_table :shops end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/generators/shopify_app/shop_model/templates/db/migrate/create_shops.rb', line 2 def self.up create_table :shops do |t| t.string :shopify_domain, null: false t.string :shopify_token, null: false t. end add_index :shops, :shopify_domain, unique: true end |