From cd8ef7dbf6ada3dd4a63e1a2941347f774e9b70e Mon Sep 17 00:00:00 2001 From: Jason Tudisco Date: Mon, 16 Mar 2026 18:53:25 -0600 Subject: [PATCH] fix: split SQLite migration 008 into ALTER TABLE + CREATE UNIQUE INDEX SQLite does not support ADD COLUMN with inline UNIQUE constraint. Co-Authored-By: Claude Opus 4.6 (1M context) --- server/migrations/008_nostr.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/migrations/008_nostr.sql b/server/migrations/008_nostr.sql index eb98676..84692e8 100644 --- a/server/migrations/008_nostr.sql +++ b/server/migrations/008_nostr.sql @@ -1 +1,2 @@ -ALTER TABLE users ADD COLUMN nostr_pubkey TEXT UNIQUE; +ALTER TABLE users ADD COLUMN nostr_pubkey TEXT; +CREATE UNIQUE INDEX IF NOT EXISTS idx_users_nostr_pubkey ON users(nostr_pubkey);