From 1d6ca093835724e3da208463a5f6b8d08ae20a47 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Sat, 12 Nov 2022 14:54:05 +1100 Subject: [PATCH] fixes for postgres type stuff --- common/common/database.py | 2 ++ postgres/setup.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/common/database.py b/common/common/database.py index deb0bd1..8caff43 100644 --- a/common/common/database.py +++ b/common/common/database.py @@ -17,10 +17,12 @@ from psycogreen.gevent import patch_psycopg COMPOSITE_TYPES = [ "video_range", "video_transition", + "public.box", ] COLUMN_CASTS = { "video_ranges": "video_range[]", "video_transitions": "video_transition[]", + "video_crop": "public.box", } def get_column_placeholder(column): diff --git a/postgres/setup.sh b/postgres/setup.sh index 6a1f709..cce3fe3 100644 --- a/postgres/setup.sh +++ b/postgres/setup.sh @@ -95,7 +95,7 @@ CREATE TABLE events ( (video_ranges IS NULL AND video_transitions IS NULL) OR CARDINALITY(video_ranges) = CARDINALITY(video_transitions) + 1 ), - video_crop box, + video_crop public.box, video_title TEXT CHECK (state IN ('UNEDITED', 'DONE') OR video_title IS NOT NULL), video_description TEXT CHECK (state IN ('UNEDITED', 'DONE') OR video_description IS NOT NULL), video_tags TEXT[] CHECK (state IN ('UNEDITED', 'DONE') OR video_tags IS NOT NULL),