2024-04-26 21:12:56 +01:00
|
|
|
DROP TABLE IF EXISTS users;
|
|
|
|
DROP TABLE IF EXISTS userdata;
|
|
|
|
DROP TABLE IF EXISTS sessions;
|
2024-04-28 11:09:38 +01:00
|
|
|
DROP TABLE IF EXISTS blacklist;
|
2024-04-26 21:12:56 +01:00
|
|
|
DROP TABLE IF EXISTS oauth;
|
|
|
|
|
|
|
|
CREATE TABLE users (
|
|
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
created TEXT NOT NULL,
|
|
|
|
username TEXT NOT NULL,
|
2024-04-28 10:45:58 +01:00
|
|
|
password TEXT NOT NULL,
|
|
|
|
uniqueid TEXT NOT NULL
|
2024-04-26 21:12:56 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE userdata (
|
|
|
|
creator INTEGER NOT NULL,
|
|
|
|
appId TEXT NOT NULL,
|
|
|
|
secret TEXT NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE sessions (
|
|
|
|
sessionid INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
session TEXT NOT NULL,
|
|
|
|
id INTEGER NOT NULL,
|
2024-04-28 21:24:50 +01:00
|
|
|
device TEXT NOT NULL DEFAULT '?'
|
2024-04-26 21:12:56 +01:00
|
|
|
);
|
|
|
|
|
2024-04-28 10:45:58 +01:00
|
|
|
CREATE TABLE blacklist (
|
2024-04-28 11:13:06 +01:00
|
|
|
openid TEXT NOT NULL,
|
2024-04-28 10:45:58 +01:00
|
|
|
blacklisted BOOLEAN NOT NULL DEFAULT true,
|
|
|
|
token TEXT NOT NULL
|
2024-04-28 11:08:57 +01:00
|
|
|
);
|
2024-04-28 10:45:58 +01:00
|
|
|
|
2024-04-26 21:12:56 +01:00
|
|
|
CREATE TABLE oauth (
|
|
|
|
appId TEXT NOT NULL,
|
|
|
|
secret TEXT NOT NULL,
|
|
|
|
creator INTEGER NOT NULL,
|
2024-05-06 12:53:04 +01:00
|
|
|
rdiruri TEXT NOT NULL,
|
|
|
|
name TEXT NOT NULL
|
2024-04-26 21:12:56 +01:00
|
|
|
)
|