Files
tg-archive/migrations/20260831000000_api_tokens.sql
T
Elias Wendland 126b9e9e9f
CI and release / Detect release commit (push) Successful in 27s
CI and release / Run tests (push) Successful in 4m14s
CI and release / Build and publish container (push) Successful in 9m2s
CI and release / Create release (push) Skipped
Large 0.3 changes
- Split the gigantic mess that web.rs was into seperate files
- Split the app into two clear functions: web and bot
- Add privacy policy
- Add privacy
- Make the site respect GDPR and Discord ToS
- Add basic API
- Add timezone detection and automatic time changes
2026-08-31 17:10:02 +02:00

13 lines
340 B
SQL

CREATE TABLE IF NOT EXISTS api_tokens (
token TEXT PRIMARY KEY,
discord_id BIGINT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
FOREIGN KEY (discord_id)
REFERENCES discord_users(discord_id)
ON DELETE CASCADE
);
CREATE INDEX IF NOT EXISTS api_tokens_discord_id_idx
ON api_tokens(discord_id);