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

17 lines
432 B
Ruby
Raw Normal View History

2025-01-13 20:38:47 +00:00
# Copyright (C) 2024 Manuel Bustillo
# Copyright (C) 2024-2025 LibreWeddingPlanner contributors
2024-10-27 21:42:45 +00:00
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