We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ffd772f commit f2fb25aCopy full SHA for f2fb25a
1 file changed
src/db/scripts/init/01_create_tables.sql
@@ -4,13 +4,13 @@
4
\c event_access;
5
\endif
6
7
-CREATE TABLE users (
+CREATE TABLE IF NOT EXISTS users (
8
user_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
9
username VARCHAR(50) NOT NULL UNIQUE,
10
password_hash TEXT NOT NULL
11
);
12
13
-CREATE TABLE tickets (
+CREATE TABLE IF NOT EXISTS tickets (
14
ticket_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
15
user_id UUID NULL REFERENCES users(user_id), -- not given user until registered
16
seat VARCHAR(10) NOT NULL,
0 commit comments