From 3192897a23f5527dfa585f8067d99410fa114368 Mon Sep 17 00:00:00 2001 From: v0 Date: Wed, 11 Mar 2026 06:48:52 +0000 Subject: [PATCH] refactor: update schema.sql to match live DB Replace old scripts with a single definitive schema.sql file. Co-authored-by: Moheeb Zara <1184415+virgilvox@users.noreply.github.com> --- scripts/013_add_last_paid_at.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 scripts/013_add_last_paid_at.sql diff --git a/scripts/013_add_last_paid_at.sql b/scripts/013_add_last_paid_at.sql new file mode 100644 index 0000000..af1c4de --- /dev/null +++ b/scripts/013_add_last_paid_at.sql @@ -0,0 +1,10 @@ +-- ============================================================================= +-- Migration 013: Add space_members.last_paid_at +-- ============================================================================= +-- Adds last_paid_at column to space_members. +-- This column is written by importMembers() and linkPaymentToMember() in +-- lib/actions.ts. The column last_payment_at already existed as a legacy +-- field; last_paid_at is the canonical name used by the application code. +-- ============================================================================= + +ALTER TABLE public.space_members ADD COLUMN IF NOT EXISTS last_paid_at timestamptz;