2024-03-27 18:51:52 +00:00
|
|
|
DROP TABLE IF EXISTS users;
|
|
|
|
DROP TABLE IF EXISTS userdata;
|
|
|
|
DROP TABLE IF EXISTS sessions;
|
2024-03-28 17:05:02 +00:00
|
|
|
DROP TABLE IF EXISTS logins;
|
2024-03-28 17:53:03 +00:00
|
|
|
DROP TABLE IF EXISTS oauth;
|
2024-03-27 18:51:52 +00:00
|
|
|
|
|
|
|
CREATE TABLE users (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
created TEXT NOT NULL,
|
|
|
|
username TEXT NOT NULL,
|
|
|
|
password TEXT NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE userdata (
|
2024-03-27 19:11:44 +00:00
|
|
|
creator INTEGER NOT NULL,
|
2024-03-27 18:51:52 +00:00
|
|
|
appId TEXT NOT NULL,
|
|
|
|
secret TEXT NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE sessions (
|
|
|
|
sessionid INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
session TEXT NOT NULL,
|
|
|
|
id INTEGER NOT NULL,
|
|
|
|
device TEXT NOT NULL DEFAULT "?"
|
|
|
|
);
|
2024-03-28 17:07:30 +00:00
|
|
|
|
|
|
|
CREATE TABLE logins (
|
|
|
|
appId TEXT NOT NULL,
|
|
|
|
secret TEXT NOT NULL,
|
2024-03-29 11:54:15 +00:00
|
|
|
nextsecret TEXT NOT NULL,
|
2024-03-28 17:07:30 +00:00
|
|
|
code TEXT NOT NULL,
|
|
|
|
nextcode TEXT NOT NULL,
|
2024-03-28 17:51:21 +00:00
|
|
|
creator INTEGER NOT NULL,
|
2024-03-31 12:38:29 +01:00
|
|
|
openid TEXT NOT NULL,
|
2024-03-31 12:43:18 +01:00
|
|
|
nextopenid TEXT NOT NULL,
|
2024-03-31 12:38:29 +01:00
|
|
|
pkce TEXT NOT NULL,
|
|
|
|
pkcemethod TEXT NOT NULL
|
2024-03-28 17:53:03 +00:00
|
|
|
);
|
2024-03-28 17:51:29 +00:00
|
|
|
|
|
|
|
CREATE TABLE oauth (
|
|
|
|
appId TEXT NOT NULL,
|
|
|
|
secret TEXT NOT NULL,
|
|
|
|
creator INTEGER NOT NULL
|
|
|
|
)
|