history feature
Some checks failed
ci/woodpecker/push/build Pipeline failed

This commit is contained in:
JMARyA 2024-12-22 20:19:52 +01:00
parent 95c4cf6fe1
commit a0e7c5d3c1
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
8 changed files with 111 additions and 23 deletions

View file

@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS video_history (
id BIGSERIAL PRIMARY KEY,
username VARCHAR(255) NOT NULL,
video_id UUID NOT NULL,
timestamp TIMESTAMPTZ NOT NULL DEFAULT NOW(),
FOREIGN KEY (username) REFERENCES users (username) ON DELETE CASCADE,
FOREIGN KEY (video_id) REFERENCES videos (id) ON DELETE CASCADE
);