Sha256: bea2873805b7daec498013e4207d8f35fccf1f26104ea1d448c5e18ec552cf95

Contents?: true

Size: 494 Bytes

Versions: 8

Compression:

Stored size: 494 Bytes

Contents

class CreateItems < ActiveRecord::Migration
  def self.up
    create_table :items do |t|
      # common attributes
      t.string :title
      t.integer :amount
      t.integer :category_id
      t.date :date
      t.integer :position
      t.timestamps

      # for Expense, Income
      t.integer :account_id
      # for Move
      t.integer :account_id_from
      t.integer :account_id_to

      # for STI
      t.string :type 
    end
  end

  def self.down
    drop_table :items
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
yhara-moneyrail-0.0.2 db/migrate/20090804065900_create_items.rb
moneyrail-0.1.6 db/migrate/20090804065900_create_items.rb
moneyrail-0.1.5 db/migrate/20090804065900_create_items.rb
moneyrail-0.1.4 db/migrate/20090804065900_create_items.rb
moneyrail-0.1.2 db/migrate/20090804065900_create_items.rb
moneyrail-0.1.1 db/migrate/20090804065900_create_items.rb
moneyrail-0.1.0 db/migrate/20090804065900_create_items.rb
moneyrail-0.0.2 db/migrate/20090804065900_create_items.rb