From 8258468f7b8a58b64924f103440c32dc06440943 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 14 Aug 2023 08:20:40 +0100 Subject: [PATCH] Implement channels table. --- src/main/resources/changelog/version/0-1-init.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/resources/changelog/version/0-1-init.sql b/src/main/resources/changelog/version/0-1-init.sql index e44fd80..6e6eb01 100644 --- a/src/main/resources/changelog/version/0-1-init.sql +++ b/src/main/resources/changelog/version/0-1-init.sql @@ -10,4 +10,18 @@ DROP INDEX IF EXISTS users_id_idx; CREATE INDEX IF NOT EXISTS username_idx ON users (username ASC); +--rollback DROP INDEX IF EXISTS username_idx; --rollback DROP TABLE IF EXISTS users; + +CREATE TABLE IF NOT EXISTS channels ( + uploader_id VARCHAR(24) NOT NULL, + uploader VARCHAR(100) NULL, + uploader_avatar VARCHAR(150) NULL, + verified BOOL NULL, + CONSTRAINT channels_pkey PRIMARY KEY (uploader_id) +); + +CREATE INDEX IF NOT EXISTS channels_uploader_idx ON channels (uploader ASC); + +--rollback DROP INDEX IF EXISTS channels_uploader_idx; +--rollback DROP TABLE IF EXISTS channels;