From 114e8dc5bccba1655d3e23e225f839d592908da2 Mon Sep 17 00:00:00 2001 From: Tiago Yamamoto Date: Fri, 26 Dec 2025 22:56:46 -0300 Subject: [PATCH] fix: add payment_method column to orders table Migration 0008: adds payment_method column with default 'pix' Fixes 500 error: column "payment_method" does not exist --- .../postgres/migrations/0008_orders_payment_method.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 backend/internal/repository/postgres/migrations/0008_orders_payment_method.sql diff --git a/backend/internal/repository/postgres/migrations/0008_orders_payment_method.sql b/backend/internal/repository/postgres/migrations/0008_orders_payment_method.sql new file mode 100644 index 0000000..38e657d --- /dev/null +++ b/backend/internal/repository/postgres/migrations/0008_orders_payment_method.sql @@ -0,0 +1,7 @@ +-- Add payment_method column to orders table +-- This column tracks how the order was paid (pix, credit_card, debit_card) + +ALTER TABLE orders ADD COLUMN IF NOT EXISTS payment_method TEXT NOT NULL DEFAULT 'pix'; + +-- Add comment for documentation +COMMENT ON COLUMN orders.payment_method IS 'Payment method: pix, credit_card, debit_card';