Skip to content

Commit

Permalink
Merge pull request #23 from ConnActivity/feature/switch-to-TEXT-type
Browse files Browse the repository at this point in the history
switch to TEXT datatype to avoid cut of strings
  • Loading branch information
Flippchen authored Dec 14, 2023
2 parents 6ac6701 + b6f35f5 commit 9e4fbf1
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions create_table.sql
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
CREATE TABLE Movies (
id INT PRIMARY KEY,
title VARCHAR(255),
original_title VARCHAR(255),
title TEXT,
original_title TEXT,
imdb_id VARCHAR(20),
overview TEXT,
tagline VARCHAR(255),
tagline TEXT,
release_date DATE,
runtime INT,
budget DECIMAL(15, 2),
revenue DECIMAL(15, 2),
adult BOOLEAN,
video BOOLEAN,
backdrop_path VARCHAR(255),
poster_path VARCHAR(255),
homepage VARCHAR(255),
backdrop_path TEXT,
poster_path TEXT,
homepage TEXT,
status VARCHAR(50),
original_language VARCHAR(10)
);

CREATE TABLE Genres (
id INT PRIMARY KEY,
name VARCHAR(50)
name TEXT
);

CREATE TABLE ProductionCompanies (
id INT PRIMARY KEY,
name VARCHAR(255),
logo_path VARCHAR(255),
name TEXT,
logo_path TEXT,
origin_country VARCHAR(5)
);

CREATE TABLE ProductionCountries (
iso_3166_1 VARCHAR(5) PRIMARY KEY,
name VARCHAR(255)
name TEXT
);

CREATE TABLE SpokenLanguages (
iso_639_1 VARCHAR(5) PRIMARY KEY,
name VARCHAR(255),
english_name VARCHAR(255)
name TEXT,
english_name TEXT
);

CREATE TABLE MovieGenres (
Expand Down Expand Up @@ -75,32 +75,32 @@ CREATE TABLE MovieSpokenLanguages (
CREATE TABLE Changes (
movie_id INT,
datetime date,
datapoint VARCHAR(255),
datapoint TEXT,
PRIMARY KEY (movie_id, datetime, datapoint),
FOREIGN KEY (movie_id) REFERENCES Movies(id),
count INT
);

CREATE TABLE people (
id SERIAL PRIMARY KEY,
name VARCHAR(100),
name TEXT,
gender INTEGER,
known_for_department VARCHAR(50),
profile_path VARCHAR(255),
known_for_department TEXT,
profile_path TEXT,
adult BOOLEAN
);

CREATE TABLE known_works (
id SERIAL PRIMARY KEY,
person_id INTEGER REFERENCES people(id),
adult BOOLEAN,
backdrop_path VARCHAR(255),
title VARCHAR(100),
backdrop_path TEXT,
title TEXT,
original_language VARCHAR(10),
original_title VARCHAR(100),
original_title TEXT,
overview TEXT,
poster_path VARCHAR(255),
media_type VARCHAR(50),
poster_path TEXT,
media_type TEXT,
popularity NUMERIC(10,3),
release_date DATE,
video BOOLEAN,
Expand Down

0 comments on commit 9e4fbf1

Please sign in to comment.