From 57cf91004224018e48ce879178b92ba363bcde12 Mon Sep 17 00:00:00 2001 From: ITQ Date: Fri, 22 May 2026 19:04:26 +0300 Subject: [PATCH] fix(migrations): fixed migrations --- src/main/resources/db/migration/V4__add_ratings_table.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/db/migration/V4__add_ratings_table.sql b/src/main/resources/db/migration/V4__add_ratings_table.sql index be1f105..2141e8f 100644 --- a/src/main/resources/db/migration/V4__add_ratings_table.sql +++ b/src/main/resources/db/migration/V4__add_ratings_table.sql @@ -1,8 +1,8 @@ -- Create ratings table to store user film ratings CREATE TABLE ratings ( id BIGSERIAL PRIMARY KEY, - user_id BIGINT NOT NULL REFERENCES users(id) ON DELETE CASCADE, - film_id BIGINT NOT NULL REFERENCES films(id) ON DELETE CASCADE, + user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE, + film_id UUID NOT NULL REFERENCES films(id) ON DELETE CASCADE, rating NUMERIC(3, 1) NOT NULL CHECK (rating >= 0 AND rating <= 10), source VARCHAR(50) NOT NULL DEFAULT 'MOVIENIGHT', created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,