]> jfr.im git - uguu.git/blame - src/static/dbSchemas/postgres_schema.sql
Update postgres_schema.sql
[uguu.git] / src / static / dbSchemas / postgres_schema.sql
CommitLineData
52053519
GJ
1CREATE TABLE files
2(
9ec728b4 3 id INT GENERATED BY DEFAULT AS identity,
52053519
GJ
4 hash text NOT NULL,
5 originalname text NOT NULL,
6 filename text NOT NULL,
7 size integer not null,
8 date integer not null,
9 ip text null
10);
11
12CREATE TABLE blacklist
13(
9ec728b4 14 id INT GENERATED BY DEFAULT AS identity,
52053519 15 hash text NOT NULL,
9ec728b4
GJ
16 originalname text NULL,
17 time integer null,
52053519
GJ
18 ip text null
19);
20
21CREATE TABLE ratelimit
22(
9ec728b4 23 id INT GENERATED BY DEFAULT AS identity,
52053519
GJ
24 iphash text NOT NULL,
25 files integer not null,
26 time integer not null
b715f164
GJ
27);
28
29CREATE TABLE accounts
30(
9ec728b4 31 id INT GENERATED BY DEFAULT AS identity,
b715f164
GJ
32 email text NOT NULL,
33 pass text not null,
34 level integer not null
52053519 35);