Sha256: 9e98afc54df998ca66ede03b16c72a7b134e1ef365ddc5be87f18db7101e1580

Contents?: true

Size: 648 Bytes

Versions: 1

Compression:

Stored size: 648 Bytes

Contents

class <%= @migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
  def self.up
    create_table :instruments_resources_stores do |t|
      t.belongs_to :store, type: :uuid, foreign_key: true
      t.belongs_to :instrument, type: :uuid, foreign_key: true
      t.belongs_to :resource, type: :uuid, foreign_key: true

      t.timestamps
    end

    add_index :instruments_resources_stores, %I[store_id instrument_id], name: 's_i_index'
    add_index :instruments_resources_stores, %I[instrument_id store_id], name: 'i_s_index'
  end

  def self.down
    drop_table :instruments_resources_stores
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hws-payment_operations_demo-0.1.0 lib/generators/hws/payment_operations_demo/templates/migration.rb.erb