Sha256: 263824ef01a1a64d18df95b929b1f1b6c53c842a14123b724feac75af7e11215

Contents?: true

Size: 554 Bytes

Versions: 1

Compression:

Stored size: 554 Bytes

Contents

class CreateTransactions < ActiveRecord::Migration
  def self.up
    create_table :transactions, :force => true do |t|
      t.column :subscription_id, :integer, :null => false
      t.column :success, :boolean, :null => false
      t.column :billing_key, :string, :null => false
      t.column :amount_cents, :integer, :null => false
      t.column :message, :string, :null => true
      t.column :created_at, :timestamp, :null => false
    end
    add_index :transactions, :subscription_id
  end

  def self.down
    drop_table :transactions
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
freemium-ajb-0.0.4 lib/generators/freemium/install/templates/db/migrate/create_transactions.rb