We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ba0287 commit 80e3bacCopy full SHA for 80e3bac
migration.sql
@@ -6,6 +6,8 @@ ALTER TABLE pastes DROP COLUMN IF EXISTS last_edited CASCADE; -- no longer allow
6
ALTER TABLE pastes ALTER COLUMN password SET DEFAULT NULL; -- nullable password by default
7
ALTER TABLE pastes DROP COLUMN IF EXISTS origin_ip CASCADE; -- no longer needed
8
ALTER TABLE pastes ADD COLUMN IF NOT EXISTS safety TEXT UNIQUE; -- this is how we handle paste deletion.
9
+UPDATE pastes SET safety = SELECT gen_random_uuid(); -- Populate with junk data.
10
+ALTER TABLE pastes ALTER COLUMN safety SET NOT NULL; -- add not null constraint
11
CREATE UNIQUE INDEX IF NOT EXISTS pastes_safety_idx ON pastes (safety); -- -- Index by safety keys for faster lookup to delete.
12
13
SAVEPOINT files;
0 commit comments