FEAT: Added Database To CMS Serbove
Build, Push and Deploy CMS / build-push-deploy (push) Successful in 2m17s
Build, Push and Deploy CMS / build-push-deploy (push) Successful in 2m17s
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
CREATE TABLE categories (
|
||||
id SMALLSERIAL PRIMARY KEY,
|
||||
name TEXT NOT NULL UNIQUE
|
||||
);
|
||||
|
||||
INSERT INTO categories (name) VALUES
|
||||
('documentary'),
|
||||
('news'),
|
||||
('entertainment'),
|
||||
('podcast'),
|
||||
('other');
|
||||
|
||||
CREATE TABLE videos (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
title TEXT NOT NULL,
|
||||
description TEXT NOT NULL DEFAULT '',
|
||||
category_id SMALLINT NOT NULL REFERENCES categories(id),
|
||||
tags TEXT NOT NULL DEFAULT '',
|
||||
file_name TEXT NOT NULL,
|
||||
storage_key TEXT NOT NULL UNIQUE,
|
||||
mediaconvert_job_id TEXT NOT NULL DEFAULT '',
|
||||
status TEXT NOT NULL DEFAULT 'processing',
|
||||
size_bytes BIGINT NOT NULL DEFAULT 0,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||||
);
|
||||
Reference in New Issue
Block a user