Skip to content

Instantly share code, notes, and snippets.

require "active_record"
require_relative "generators/my_engine/migration_generator"
require_relative "my_engine/version"
# MyEngine module
# [INFO] Lazy load core components of the engine.
module MyEngine
autoload :Core, "my_engine/core"
autoload :Helpers, "my_engine/helpers"
autoload :Revitalize, "my_engine/revitalize"
@swastik009
swastik009 / 20220xxxx_add_shop_access_scopes_column.rb
Created May 3, 2022 12:07
Shopify access_scopes column on shops table
class AddShopAccessScopesColumn < ActiveRecord::Migration[x,x]
def change
add_column :shops, :access_scopes, :string
end
end
@swastik009
swastik009 / 2022xxxxxxxxxx_create_shops.rb
Last active May 3, 2022 11:35
Shopify Generated Migration
class CreateShops < ActiveRecord::Migration[x.x]
def self.up
create_table :shops do |t|
t.string :shopify_domain, null: false
t.string :shopify_token, null: false
t.timestamps
end
add_index :shops, :shopify_domain, unique: true
end