mirror of
https://github.com/Dvorinka/Bookra.git
synced 2026-06-05 04:52:59 +00:00
first commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
-- +goose Up
|
||||
ALTER TABLE users
|
||||
ADD COLUMN IF NOT EXISTS neon_subject text;
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS idx_users_neon_subject
|
||||
ON users (neon_subject)
|
||||
WHERE neon_subject IS NOT NULL;
|
||||
|
||||
UPDATE users
|
||||
SET neon_subject = 'demo-owner',
|
||||
updated_at = now()
|
||||
WHERE email = 'owner@bookra.dev'
|
||||
AND neon_subject IS NULL;
|
||||
|
||||
-- +goose Down
|
||||
DROP INDEX IF EXISTS idx_users_neon_subject;
|
||||
ALTER TABLE users
|
||||
DROP COLUMN IF EXISTS neon_subject;
|
||||
Reference in New Issue
Block a user