Skip to content

Commit 1d37002

Browse files
committed
sql change
1 parent 44bc423 commit 1d37002

File tree

4 files changed

+32
-27
lines changed

4 files changed

+32
-27
lines changed
Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
1-
CREATE TABLE IF NOT EXISTS public.movie_list (
2-
id BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
3-
movie_id BIGINT NOT NULL UNIQUE,
4-
title TEXT NOT NULL,
5-
rating FLOAT,
6-
movie_year INT,
7-
image_large TEXT,
8-
url TEXT,
9-
casts TEXT,
10-
directors TEXT,
11-
genres TEXT,
12-
summary TEXT,
13-
countries TEXT,
14-
viewed BOOLEAN DEFAULT FALSE,
15-
star BOOLEAN DEFAULT FALSE,
16-
update_time timestamptz DEFAULT now(),
17-
movie_type TEXT DEFAULT 'NORMAL'
1+
create table movie_list
2+
(
3+
id bigserial not null
4+
constraint movie_list_id_pk
5+
primary key,
6+
movie_id bigint,
7+
title text,
8+
rating double precision,
9+
movie_year integer,
10+
image_large text,
11+
url text,
12+
casts text,
13+
directors text,
14+
genres text,
15+
summary text,
16+
countries text,
17+
viewed boolean default false,
18+
star boolean default false,
19+
update_time timestamp with time zone default now(),
20+
movie_type text default 'NORMAL'::text,
21+
object_id text default ''::text
1822
);
23+
24+
create index movie_type__index
25+
on movie_list (movie_type);
26+
27+
create index movie_rating__index
28+
on movie_list (rating desc);
29+
30+
create unique index movie_id_index
31+
on movie_list (movie_id);
32+
33+

src/main/resources/db/migration/postgres/V201810271200__alterMovieList.sql

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/main/resources/db/migration/postgres/V202003281100__changeTimestampType.sql

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/main/resources/db/migration/postgres/V202006201600__addMovieTypeIndex.sql

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)