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

index 25bb0dc82a4a0b477d67e5a95c2d3ce6f1130b21..099b54238fe00ca41a1c96148cc33ccd485e4776 100644 (file)
@@ -1,6 +1,6 @@
 CREATE TABLE files
 (
-    id INT GENERATED BY DEFAULT AS identity,
+    id           INT PRIMARY key GENERATED BY DEFAULT AS identity,
     hash         text    NOT NULL,
     originalname text    NOT NULL,
     filename     text    NOT NULL,
@@ -11,7 +11,7 @@ CREATE TABLE files
 
 CREATE TABLE blacklist
 (
-    id           INT GENERATED BY DEFAULT AS identity,
+    id           INT PRIMARY key GENERATED BY DEFAULT AS identity,
     hash         text    NOT NULL,
     originalname text    NULL,
     time         integer null,
@@ -20,7 +20,7 @@ CREATE TABLE blacklist
 
 CREATE TABLE ratelimit
 (
-    id INT GENERATED BY DEFAULT AS identity,
+    id     INT PRIMARY key GENERATED BY DEFAULT AS identity,
     iphash text    NOT NULL,
     files  integer not null,
     time   integer not null
@@ -28,8 +28,8 @@ CREATE TABLE ratelimit
 
 CREATE TABLE accounts
 (
-    id INT GENERATED BY DEFAULT AS identity,
+    id    INT PRIMARY key GENERATED BY DEFAULT AS identity,
     email text    NOT NULL,
-    pass  text not null,
-    level   integer not null
+    pass  text    not null,
+    level integer not null
 );
\ No newline at end of file