feat: sql, migrations, sql postgress db setup, movie model

This commit is contained in:
2026-03-13 13:19:55 +01:00
parent 92295654e7
commit bf1c306ef7
14 changed files with 148 additions and 13 deletions
@@ -0,0 +1,6 @@
ALTER TABLE movies ADD CONSTRAINT movies_runtime_check CHECK (runtime >= 0);
ALTER TABLE movies ADD CONSTRAINT movies_year_check CHECK (year BETWEEN 1888 AND date_part('year', now()));
ALTER TABLE movies ADD CONSTRAINT genres_length_check CHECK (array_length(genres, 1) BETWEEN 1 AND 5);