RestApiv2/migrates/20221213130458_films.up.sql

34 lines
806 B
SQL

CREATE TABLE films (
id INTEGER NOT NULL,
ru_title VARCHAR(256),
orig_title VARCHAR(255),
imdb_id VARCHAR(255),
kinopoisk_id INTEGER,
posterUrl VARCHAR(1500),
posterUrlPreview VARCHAR(1500),
countries JSON,
genres JSON,
year INTEGER,
description VARCHAR(20000),
ratingKinopoisk INTEGER,
ratingImdb INTEGER,
iframe_src VARCHAR(2000),
ratingImdbVoteCount INTEGER,
ratingKinopoiskVoteCount INTEGER,
created VARCHAR(1500),
media JSON,
PRIMARY KEY(id)
);
CREATE TABLE users (
id INTEGER NOT NULL,
login VARCHAR(25) not NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(2500) NOT NULL,
avatar_url VARCHAR(2500),
token VARCHAR(2500) NOT NULL,
permisionLVL INTEGER NOT NULL,
PRIMARY KEY(id)
);