29 lines
1.1 KiB
SQL
29 lines
1.1 KiB
SQL
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
|
|
)
|