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 e11c17f commit 379cc2fCopy full SHA for 379cc2f
schema.sql
@@ -9,13 +9,16 @@ CREATE TABLE IF NOT EXISTS pastes (
9
safety TEXT UNIQUE
10
);
11
12
+CREATE UNIQUE INDEX IF NOT EXISTS pastes_safety_idx ON pastes (safety);
13
+-- Index by safety keys for faster lookup to delete.
14
+
15
CREATE TABLE IF NOT EXISTS files (
16
parent_id TEXT REFERENCES pastes(id) ON DELETE CASCADE,
17
content TEXT NOT NULL,
18
filename TEXT NOT NULL,
19
loc INTEGER NOT NULL,
20
charcount INTEGER GENERATED ALWAYS AS (LENGTH(content)) STORED,
- index SERIAL NOT NULL,
21
+ file_index SERIAL NOT NULL,
22
annotation TEXT,
- PRIMARY KEY (parent_id, index)
-);
23
+ PRIMARY KEY (parent_id, file_index)
24
+);
0 commit comments