update schema
This commit is contained in:
parent
d1ecf464cb
commit
9423e31841
@ -1,7 +1,17 @@
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
id SERIAL PRIMARY KEY,
|
||||
username TEXT NOT NULL UNIQUE,
|
||||
email TEXT NOT NULL UNIQUE,
|
||||
api_key TEXT UNIQUE,
|
||||
storage_limit_bytes BIGINT DEFAULT 1073741824,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS buckets (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name TEXT NOT NULL UNIQUE,
|
||||
owner_id INT NOT NULL,
|
||||
owner_id INT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
storage_used_bytes BIGINT DEFAULT 0,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW()
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user