You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
456 B
MySQL
17 lines
456 B
MySQL
3 years ago
|
CREATE TABLE IF NOT EXISTS file_stats(
|
||
|
id BIGINT PRIMARY KEY,
|
||
|
num BIGINT NOT NULL,
|
||
|
size_b BIGINT NOT NULL
|
||
|
);
|
||
|
|
||
|
CREATE TABLE IF NOT EXISTS namespace(
|
||
|
id BIGINT PRIMARY KEY,
|
||
|
name TEXT NOT NULL UNIQUE,
|
||
|
lastseen BIGINT NOT NULL,
|
||
|
allowance_time BIGINT,
|
||
|
quota_kb BIGINT,
|
||
|
quota_usage_kb BIGINT,
|
||
|
download_id BIGINT NOT NULL REFERENCES file_stats(Id) ON DELETE CASCADE,
|
||
|
upload_id BIGINT NOT NULL REFERENCES file_stats(Id) ON DELETE CASCADE
|
||
|
);
|