Rewrote backend in Rust

This commit is contained in:
2022-10-10 23:07:40 +02:00
parent fccb823801
commit 89b6513905
75 changed files with 2508 additions and 7490 deletions

View File

@@ -0,0 +1,3 @@
DROP TABLE inode;
DROP TABLE user;
DROP TABLE tokens

View File

@@ -0,0 +1,28 @@
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
)