From 88677ea29f481e43203cf2dbf132daa93acd3631 Mon Sep 17 00:00:00 2001 From: Lars Date: Tue, 21 Apr 2026 21:07:52 +0200 Subject: [PATCH] fix: Add missing auth columns to profiles table --- backend/migrations/004_add_auth_columns.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backend/migrations/004_add_auth_columns.sql diff --git a/backend/migrations/004_add_auth_columns.sql b/backend/migrations/004_add_auth_columns.sql new file mode 100644 index 0000000..b799b56 --- /dev/null +++ b/backend/migrations/004_add_auth_columns.sql @@ -0,0 +1,13 @@ +-- Migration 004: Add missing auth columns to profiles table +-- Adds columns needed for email verification and trial system + +ALTER TABLE profiles +ADD COLUMN IF NOT EXISTS auth_type VARCHAR(50) DEFAULT 'email', +ADD COLUMN IF NOT EXISTS verification_expires TIMESTAMP, +ADD COLUMN IF NOT EXISTS trial_ends_at TIMESTAMP; + +-- Update existing profiles to have default values +UPDATE profiles +SET auth_type = 'email', + email_verified = true -- existing profiles are considered verified +WHERE auth_type IS NULL;