remove sqlite extensions to fix docker issue

UUIDs are now generated in the backend before insertion
This commit is contained in:
2025-09-07 17:19:16 +02:00
parent a1c9832515
commit 6fa26b3ddb
33 changed files with 754 additions and 308 deletions

View File

@@ -1,5 +1,5 @@
CREATE TABLE users (
id BLOB NOT NULL PRIMARY KEY DEFAULT (uuid_blob(uuid())),
id BLOB NOT NULL PRIMARY KEY,
oidc_sub TEXT UNIQUE,
name TEXT NOT NULL,
email TEXT NOT NULL UNIQUE,
@@ -10,7 +10,7 @@ CREATE TABLE users (
);
CREATE TABLE warrens (
id BLOB NOT NULL PRIMARY KEY DEFAULT (uuid_blob(uuid())),
id BLOB NOT NULL PRIMARY KEY,
name TEXT NOT NULL,
path TEXT NOT NULL UNIQUE,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
@@ -31,7 +31,7 @@ CREATE TABLE user_warrens (
);
CREATE TABLE shares (
id BLOB NOT NULL PRIMARY KEY DEFAULT (uuid_blob(uuid())),
id BLOB NOT NULL PRIMARY KEY,
creator_id BLOB NOT NULL REFERENCES users(id) ON DELETE CASCADE,
warren_id BLOB NOT NULL REFERENCES warrens(id) ON DELETE CASCADE,
path TEXT NOT NULL,
@@ -48,3 +48,8 @@ CREATE TABLE auth_sessions (
expires_at DATETIME NOT NULL,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE application_options (
key TEXT NOT NULL PRIMARY KEY,
value TEXT NOT NULL
);