Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aderyabin/5235648 to your computer and use it in GitHub Desktop.
Save aderyabin/5235648 to your computer and use it in GitHub Desktop.
migration
# encoding: utf-8
# -*- encoding : utf-8 -*-
class CreateBillingPayments < ActiveRecord::Migration
def self.up
create_table :billing_payments do |t|
t.integer :billing_invoice_id, :null => false
t.decimal :amount, :null => false
t.string :gateway, :null => false
t.string :transaction_id
t.string :currency
t.timestamps
end
add_index :billing_payments, :billing_invoice_id
end
def self.down
drop_table :billing_payments
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment