budget/db/migrate/20221120205511_create_incomes.rb

13 lines
378 B
Ruby
Raw Permalink Normal View History

2022-11-20 16:02:41 -05:00
class CreateIncomes < ActiveRecord::Migration[7.0]
def change
create_table :incomes do |t|
t.string :description, default: "", null: false
t.boolean :included, default: true, null: false
t.decimal :amount, default: 0.00, null: false, precision: 9, scale: 2
t.references :member, null: false, foreign_key: true
t.timestamps
end
end
end