-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(bsr): Correct data types in past_similar_offer table
- Loading branch information
1 parent
fc5c31a
commit 333f367
Showing
1 changed file
with
13 additions
and
11 deletions.
There are no files selected for viewing
24 changes: 13 additions & 11 deletions
24
apps/recommendation/db/scripts/create_past_similar_offers.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
CREATE TABLE past_similar_offers ( | ||
id SERIAL PRIMARY KEY, | ||
user_id int, | ||
origin_offer_id int, | ||
offer_id int, | ||
date timestamp with time zone, | ||
group_id varchar, | ||
model_name varchar, | ||
model_version varchar, | ||
call_id varchar, | ||
reco_filters json, | ||
venue_iris_id varchar | ||
user_id INT NOT NULL, | ||
origin_offer_id INT NOT NULL, | ||
offer_id INT NOT NULL, | ||
date TIMESTAMP WITH TIME ZONE NOT NULL, | ||
group_id VARCHAR2(255) NOT NULL, | ||
model_name VARCHAR2(255) NOT NULL, | ||
model_version VARCHAR2(50) NOT NULL, | ||
call_id VARCHAR2(100) NOT NULL, | ||
reco_filters JSON, | ||
venue_iris_id VARCHAR2(100) NOT NULL | ||
); | ||
|
||
ALTER TABLE past_similar_offers ALTER COLUMN id TYPE BIGINT; | ||
ALTER SEQUENCE past_similar_offers_id_seq AS BIGINT MAXVALUE 9223372036854775807 CYCLE; | ||
|
||
ALTER SEQUENCE past_similar_offers_id_seq AS BIGINT | ||
MAXVALUE 9223372036854775807 CYCLE; |