foodsoft/db/migrate/20090102155714_create_invoi...

20 lines
409 B
Ruby
Raw Normal View History

class CreateInvoices < ActiveRecord::Migration
def self.up
create_table :invoices do |t|
t.integer :supplier_id
t.integer :delivery_id
t.string :number
t.date :date
t.date :paid_on
t.text :note
t.decimal :amount, :null => false, :precision => 8, :scale => 2, :default => 0.0
t.timestamps
end
end
def self.down
drop_table :invoices
end
end