Skip to content

Commit 518b0f6

Browse files
committed
chore: remove users table, user_id and version from redirects
1 parent 98d90ea commit 518b0f6

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

init.sql

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
1-
CREATE TABLE IF NOT EXISTS users (
2-
id TEXT PRIMARY KEY,
3-
email TEXT NOT NULL,
4-
email_hash TEXT UNIQUE NOT NULL,
5-
password_hash TEXT NOT NULL,
6-
username TEXT,
7-
avatar_url TEXT,
8-
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
9-
);
10-
11-
CREATE UNIQUE INDEX IF NOT EXISTS users_email_hash_uidx ON users (email_hash) WHERE email_hash IS NOT NULL;
12-
131
CREATE TABLE IF NOT EXISTS redirects (
142
id TEXT PRIMARY KEY,
153
url TEXT NOT NULL,
164
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
17-
user_id TEXT REFERENCES users(id),
18-
version TEXT DEFAULT 'dash',
195
expires_at TIMESTAMP
206
);
21-
22-
CREATE INDEX IF NOT EXISTS redirects_user_id_idx ON redirects (user_id);

0 commit comments

Comments
 (0)