Module: CoinsPaid::MigrationData

Defined in:
lib/generators/coins_paid/migration_data.rb

Class Method Summary collapse

Class Method Details

.getObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/generators/coins_paid/migration_data.rb', line 7

def get
  <<~RUBY
    create_table :coins_paid_addresses do |t|
      t.string :foreign_id, null: false
      t.string :currency, null: false
      t.string :convert_to, null: false
      t.string :address, null: false
      t.string :tag
      t.integer :external_id, null: false

      t.timestamps
      t.index [:foreign_id, :currency, :convert_to], name: :address_currencies, unique: true
    end
  RUBY
end