Files
ohrwurm/migrations/20240620151940_init.sql
Johannes Heuel dfd0f9c8c8
All checks were successful
tests / build (push) Successful in 1m15s
tests / fmt (push) Successful in 1m44s
tests / clippy (push) Successful in 1m57s
tests / pre-commit (push) Successful in 2m8s
tests / test (push) Successful in 2m19s
deploy / release-image (push) Successful in 5m6s
cleanup
2024-06-30 11:16:12 +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
);