trepa/migrations/20240703103105_movies.up.sql

15 lines
454 B
MySQL
Raw Normal View History

2024-12-30 22:29:16 +01:00
-- Add migration script here
CREATE TABLE IF NOT EXISTS public.movies
(
id integer NOT NULL GENERATED ALWAYS AS IDENTITY,
title text NOT NULL,
overview text NOT NULL,
poster_path text NOT NULL,
backdrop_path text,
release_date date NOT NULL,
tmdb_id integer NOT NULL,
created_at timestamp without time zone NOT NULL DEFAULT now(),
updated_at timestamp without time zone NOT NULL DEFAULT now(),
PRIMARY KEY (id)
);