mirror of
https://github.com/TeamPiped/Piped-Backend.git
synced 2024-08-14 23:51:41 +00:00
Add playlist_videos table.
This commit is contained in:
parent
96819a51c6
commit
be7f54617d
1 changed files with 15 additions and 0 deletions
|
@ -46,3 +46,18 @@ CREATE TABLE IF NOT EXISTS playlists (
|
|||
);
|
||||
|
||||
--rollback DROP TABLE IF EXISTS playlists;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS playlist_videos (
|
||||
id VARCHAR(11) NOT NULL,
|
||||
duration INT8 NULL,
|
||||
thumbnail VARCHAR(400) NULL,
|
||||
title VARCHAR(120) NULL,
|
||||
uploader_id VARCHAR(24) NOT NULL,
|
||||
CONSTRAINT playlist_videos_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_playlist_video_uploader_id FOREIGN KEY (uploader_id) REFERENCES channels(uploader_id)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS playlist_videos_id_idx ON playlist_videos (id ASC);
|
||||
CREATE INDEX IF NOT EXISTS playlist_videos_uploader_id_idx ON playlist_videos (uploader_id ASC);
|
||||
|
||||
--rollback DROP TABLE IF EXISTS playlist_videos;
|
||||
|
|
Loading…
Reference in a new issue