wedding-planner/db/migrate/20240711175425_create_expenses.rb

13 lines
334 B
Ruby
Raw Normal View History

2024-07-11 19:55:48 +02:00
class CreateExpenses < ActiveRecord::Migration[7.1]
def change
create_enum :pricing_types, ["fixed", "per_person"]
create_table :expenses, id: :uuid do |t|
t.string :name
t.decimal :amount
t.enum :pricing_type, enum_type: :pricing_types, default: "fixed", null: false
t.timestamps
end
end
end