From e904e9634548e47d611bdcbb88d7b180b927fd5f Mon Sep 17 00:00:00 2001
From: JustZvan <justzvan@justzvan.xyz>
Date: Fri, 6 Feb 2026 12:16:40 +0100
Subject: feat: initial commit!

---
 drizzle/20260115140000_push_tokens_array/migration.sql | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 drizzle/20260115140000_push_tokens_array/migration.sql

(limited to 'drizzle/20260115140000_push_tokens_array/migration.sql')

diff --git a/drizzle/20260115140000_push_tokens_array/migration.sql b/drizzle/20260115140000_push_tokens_array/migration.sql
new file mode 100644
index 0000000..9adc51a
--- /dev/null
+++ b/drizzle/20260115140000_push_tokens_array/migration.sql
@@ -0,0 +1,9 @@
+-- Convert push_token from text to text[] array
+-- First, create the new column
+ALTER TABLE "users" ADD COLUMN "push_tokens" text[] DEFAULT '{}';--> statement-breakpoint
+
+-- Migrate existing single token to array format (skip null values)
+UPDATE "users" SET "push_tokens" = ARRAY[push_token]::text[] WHERE push_token IS NOT NULL;--> statement-breakpoint
+
+-- Drop the old column
+ALTER TABLE "users" DROP COLUMN "push_token";
-- 
cgit v1.2.3

