fileserver/backend/migrations/2022-10-05-145523_init/up.sql

29 lines
1.1 KiB
MySQL
Raw Permalink Normal View History

2022-10-10 21:07:40 +00:00
CREATE TABLE tokens (
'id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
'owner_id' INTEGER NOT NULL,
'exp' INT8 NOT NULL
);
CREATE TABLE user (
'id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
'gitlab' BOOLEAN NOT NULL,
'name' TEXT NOT NULL,
'password' TEXT NOT NULL,
'role' INT2 NOT NULL,
'root_id' INTEGER NOT NULL,
'tfa_type' INT2 NOT NULL,
'tfa_secret' BLOB,
'gitlab_at' TEXT,
'gitlab_rt' TEXT
);
CREATE TABLE inode (
'id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
'is_file' BOOLEAN NOT NULL,
'name' TEXT NOT NULL,
'parent_id' INTEGER,
'owner_id' INTEGER NOT NULL,
'size' INT8,
'has_preview' BOOLEAN NOT NULL
)