summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rwxr-xr-xconfig/migrate-scripts/migrate-db-1eca969.sh19
-rw-r--r--config/sql/playlists.sql11
-rw-r--r--config/sql/privacy.sql10
-rw-r--r--config/sql/videos.sql17
4 files changed, 30 insertions, 27 deletions
diff --git a/config/migrate-scripts/migrate-db-1eca969.sh b/config/migrate-scripts/migrate-db-1eca969.sh
new file mode 100755
index 00000000..f840d924
--- /dev/null
+++ b/config/migrate-scripts/migrate-db-1eca969.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN title CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN views CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN likes CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN dislikes CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN wilson_score CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN published CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN description CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN language CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN author CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN ucid CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN allowed_regions CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN is_family_friendly CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN genre CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN genre_url CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN license CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN sub_count_text CASCADE"
+psql invidious kemal -c "ALTER TABLE videos DROP COLUMN author_thumbnail CASCADE"
diff --git a/config/sql/playlists.sql b/config/sql/playlists.sql
index 46ff30ec..468496cb 100644
--- a/config/sql/playlists.sql
+++ b/config/sql/playlists.sql
@@ -1,3 +1,14 @@
+-- Type: public.privacy
+
+-- DROP TYPE public.privacy;
+
+CREATE TYPE public.privacy AS ENUM
+(
+ 'Public',
+ 'Unlisted',
+ 'Private'
+);
+
-- Table: public.playlists
-- DROP TABLE public.playlists;
diff --git a/config/sql/privacy.sql b/config/sql/privacy.sql
deleted file mode 100644
index 4356813e..00000000
--- a/config/sql/privacy.sql
+++ /dev/null
@@ -1,10 +0,0 @@
--- Type: public.privacy
-
--- DROP TYPE public.privacy;
-
-CREATE TYPE public.privacy AS ENUM
-(
- 'Public',
- 'Unlisted',
- 'Private'
-);
diff --git a/config/sql/videos.sql b/config/sql/videos.sql
index 6ded01de..8def2f83 100644
--- a/config/sql/videos.sql
+++ b/config/sql/videos.sql
@@ -7,23 +7,6 @@ CREATE TABLE public.videos
id text NOT NULL,
info text,
updated timestamp with time zone,
- title text,
- views bigint,
- likes integer,
- dislikes integer,
- wilson_score double precision,
- published timestamp with time zone,
- description text,
- language text,
- author text,
- ucid text,
- allowed_regions text[],
- is_family_friendly boolean,
- genre text,
- genre_url text,
- license text,
- sub_count_text text,
- author_thumbnail text,
CONSTRAINT videos_pkey PRIMARY KEY (id)
);