]> jfr.im git - uguu.git/commitdiff
Update postgres_schema.sql
authorGo Johansson (neku) <redacted>
Sat, 18 Feb 2023 16:18:59 +0000 (17:18 +0100)
committerGo Johansson (neku) <redacted>
Sat, 18 Feb 2023 16:18:59 +0000 (17:18 +0100)
src/static/dbSchemas/postgres_schema.sql

index 687c66676ce1d3adc5619fcaf51137057e1ff5d2..25bb0dc82a4a0b477d67e5a95c2d3ce6f1130b21 100644 (file)
@@ -1,6 +1,6 @@
 CREATE TABLE files
 (
-    id           serial PRIMARY KEY,
+    id INT GENERATED BY DEFAULT AS identity,
     hash         text    NOT NULL,
     originalname text    NOT NULL,
     filename     text    NOT NULL,
@@ -11,16 +11,16 @@ CREATE TABLE files
 
 CREATE TABLE blacklist
 (
-    id           serial PRIMARY KEY,
+    id           INT GENERATED BY DEFAULT AS identity,
     hash         text    NOT NULL,
-    originalname text    NOT NULL,
-    time         integer not null,
+    originalname text    NULL,
+    time         integer null,
     ip           text    null
 );
 
 CREATE TABLE ratelimit
 (
-    id     serial PRIMARY KEY,
+    id INT GENERATED BY DEFAULT AS identity,
     iphash text    NOT NULL,
     files  integer not null,
     time   integer not null
@@ -28,7 +28,7 @@ CREATE TABLE ratelimit
 
 CREATE TABLE accounts
 (
-    id     serial PRIMARY KEY,
+    id INT GENERATED BY DEFAULT AS identity,
     email text    NOT NULL,
     pass  text not null,
     level   integer not null