Files
memos/store/migration/sqlite/0.24/01__memo_pinned.sql
gugus bb402d4ccc
Some checks failed
Backend Tests / Static Checks (push) Has been cancelled
Backend Tests / Tests (other) (push) Has been cancelled
Backend Tests / Tests (plugin) (push) Has been cancelled
Backend Tests / Tests (server) (push) Has been cancelled
Backend Tests / Tests (store) (push) Has been cancelled
Build Canary Image / build-frontend (push) Has been cancelled
Build Canary Image / build-push (linux/amd64) (push) Has been cancelled
Build Canary Image / build-push (linux/arm64) (push) Has been cancelled
Build Canary Image / merge (push) Has been cancelled
Frontend Tests / Lint (push) Has been cancelled
Frontend Tests / Build (push) Has been cancelled
Proto Linter / Lint Protos (push) Has been cancelled
first commit
2026-03-04 06:30:47 +00:00

12 lines
311 B
SQL

-- Add pinned column.
ALTER TABLE memo ADD COLUMN pinned INTEGER NOT NULL CHECK (pinned IN (0, 1)) DEFAULT 0;
-- Update pinned column from memo_organizer.
UPDATE memo
SET pinned = 1
WHERE EXISTS (
SELECT 1
FROM memo_organizer
WHERE memo.id = memo_organizer.memo_id AND memo_organizer.pinned = 1
);