remove sqlite extensions to fix docker issue
UUIDs are now generated in the backend before insertion
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
INSERT INTO users (
|
||||
name,
|
||||
email,
|
||||
hash,
|
||||
admin
|
||||
) VALUES (
|
||||
'admin',
|
||||
'admin@example.com',
|
||||
'$argon2id$v=19$m=19456,t=2,p=1$H1WsElL4921/WD5oPkY7JQ$aHudNG8z0ns3pRULfuDpuEkxPUbGxq9AHC4QGyt5odc',
|
||||
true
|
||||
);
|
||||
Reference in New Issue
Block a user