2023-10-25 04:14:32 +00:00
|
|
|
-- SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
|
|
|
|
--
|
|
|
|
-- SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
|
|
|
-- Create table of users with username, password hash, salt, and creation
|
|
|
|
-- timestamp
|
2023-10-29 14:41:00 +00:00
|
|
|
CREATE TABLE users
|
|
|
|
(
|
|
|
|
username TEXT NOT NULL PRIMARY KEY,
|
|
|
|
hash TEXT NOT NULL,
|
|
|
|
salt TEXT NOT NULL,
|
|
|
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
2023-10-25 04:14:32 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
-- Create table of sessions with session GUID, username, and timestamp of when
|
|
|
|
-- the session was created
|
2023-10-29 14:41:00 +00:00
|
|
|
CREATE TABLE sessions
|
|
|
|
(
|
|
|
|
token TEXT NOT NULL,
|
|
|
|
username TEXT NOT NULL,
|
|
|
|
expires TIMESTAMP NOT NULL,
|
|
|
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
2023-10-25 04:14:32 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
-- Create table of tracked projects with URL, name, forge, running version, and
|
|
|
|
-- timestamp of when the project was added
|
2023-10-29 14:41:00 +00:00
|
|
|
CREATE TABLE projects
|
|
|
|
(
|
|
|
|
url TEXT NOT NULL,
|
|
|
|
name TEXT NOT NULL,
|
|
|
|
forge TEXT NOT NULL,
|
|
|
|
version TEXT NOT NULL,
|
|
|
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
2023-10-25 04:14:32 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
-- Create table of project releases with the project URL and the release tags,
|
|
|
|
-- contents, URLs, and dates
|
2023-10-29 14:41:00 +00:00
|
|
|
CREATE TABLE releases
|
|
|
|
(
|
|
|
|
id TEXT NOT NULL PRIMARY KEY,
|
|
|
|
project_url TEXT NOT NULL,
|
|
|
|
release_url TEXT NOT NULL,
|
|
|
|
tag TEXT NOT NULL,
|
|
|
|
content TEXT NOT NULL,
|
|
|
|
date TIMESTAMP NOT NULL,
|
|
|
|
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
2023-10-25 04:14:32 +00:00
|
|
|
);
|