debt-manager/db/migrate/20231231172005_add_spending_to_bubbles.rb
Louis Vallat edf60e9557
feat: added spendings for bubbles
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
2023-12-31 19:06:33 +01:00

13 lines
396 B
Ruby

class AddSpendingToBubbles < ActiveRecord::Migration[7.0]
def change
create_table :spendings, id: :uuid do |t|
t.decimal :amount, null: false, default: 0
t.text :description, null: false, default: ""
t.references :bubble, type: :uuid, null: false
t.references :owner, type: :uuid, foreign_key: { to_table: :users }, null: false
t.timestamps
end
end
end