Files
ohrwurm/migrations/20240620151940_init.sql
Johannes Heuel 7edd14c628
All checks were successful
tests / fmt (push) Successful in 48s
tests / clippy (push) Successful in 1m14s
tests / pre-commit (push) Successful in 1m21s
tests / test (push) Successful in 1m32s
tests / build (push) Successful in 1m48s
deploy / release-image (push) Successful in 4m45s
save tracks
2024-06-27 22:45:09 +02:00

34 lines
683 B
SQL

CREATE TABLE IF NOT EXISTS tracks
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
url TEXT NOT NULL UNIQUE,
title TEXT NOT NULL,
channel TEXT NOT NULL,
duration TEXT NOT NULL,
thumbnail TEXT NOT NULL,
updated DATETIME NOT NULL
);
CREATE TABLE IF NOT EXISTS queries
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id TEXT NOT NULL,
guild_id TEXT NOT NULL,
track_id NUMBER NOT NULL,
updated DATETIME NOT NULL
);
CREATE TABLE IF NOT EXISTS users
(
id TEXT PRIMARY KEY,
name TEXT NOT NULL,
global_name TEXT,
updated DATETIME NOT NULL
);
CREATE TABLE IF NOT EXISTS guilds
(
id TEXT PRIMARY KEY,
updated DATETIME NOT NULL
);