Commit 25e6dcb3 authored by Naren Medarametla's avatar Naren Medarametla

Updated readme.md

parent 719036cb
...@@ -39,16 +39,16 @@ In Header click on Tool -> Query Tool --> and paste the below query ...@@ -39,16 +39,16 @@ In Header click on Tool -> Query Tool --> and paste the below query
-- DROP TABLE public.offer_lookup; -- DROP TABLE public.offer_lookup;
CREATE TABLE public.offer_lookup CREATE TABLE offer_lookup
( (
id INTEGER, COLLATE pg_catalog."default" NOT NULL, id INTEGER,
store_id text COLLATE pg_catalog."default" NOT NULL, store_id VARCHAR(200),
terminal text COLLATE pg_catalog."default" NOT NULL, terminal VARCHAR(200),
offer_type text COLLATE pg_catalog."default" NOT NULL, offer_type VARCHAR(200),
offer_id text COLLATE pg_catalog."default" NOT NULL, offer_id INTEGER ,
pre_condition text COLLATE pg_catalog."default" NOT NULL, pre_condition VARCHAR (100),
CONSTRAINT "OfferLookup_pkey" PRIMARY KEY (id, offer_type,offer_id) PRIMARY KEY(id, offer_type,offer_id)
) );
TABLESPACE pg_default; TABLESPACE pg_default;
...@@ -109,19 +109,18 @@ INSERT INTO endofsale VALUES ( uuid_generate_v4() , ...@@ -109,19 +109,18 @@ INSERT INTO endofsale VALUES ( uuid_generate_v4() ,
-- DROP TABLE public.offer_meta_data; -- DROP TABLE public.offer_meta_data;
CREATE TABLE public.offer_meta_data CREATE TABLE offer_metadata
( (
offer_id INTEGER COLLATE pg_catalog."default" NOT NULL, offer_id serial PRIMARY KEY,
eligibility text COLLATE pg_catalog."default" NOT NULL, eligibilty VARCHAR(200),
discount_type text COLLATE pg_catalog."default" NOT NULL, discount_type VARCHAR(200),
status text COLLATE pg_catalog."default" NOT NULL, status VARCHAR(50) NOT NULL,
start_time timestamp with time zone NOT NULL, start_time VARCHAR(20),
end_time timestamp with time zone NOT NULL, end_time VARCHAR(20),
offer_desc text COLLATE pg_catalog."default" NOT NULL, offer_desc VARCHAR (355),
offer_type text COLLATE pg_catalog."default" NOT NULL, offer_type INTEGER,
rcpt_text text COLLATE pg_catalog."default" NOT NULL, rcpt_text VARCHAR (200)
CONSTRAINT offer_meta_data_pkey PRIMARY KEY (offer_id) );
)
TABLESPACE pg_default; TABLESPACE pg_default;
...@@ -140,24 +139,24 @@ ALTER TABLE public.offer_meta_data ...@@ -140,24 +139,24 @@ ALTER TABLE public.offer_meta_data
dummy data dummy data
========== ==========
INSERT INTO public.offer_meta_data( INSERT INTO public.offer_metadata(
offer_id, eligibility, discount_type, status, start_time,end_time, offer_id, eligibility, discount_type, status, start_time,end_time,
offer_desc,offer_type,rcpt_text) offer_desc,offer_type,rcpt_text)
VALUES (1,'elgibility','dicounted','Active','2020-04-14 19:10:25','2020-04-15 19:10:25', VALUES (1,'elgibility','dicounted','Active','2020-04-14 19:10:25','2020-04-15 19:10:25',
'30 percent','5','RCPT TXT'); '30 percent','5','RCPT TXT');
INSERT INTO public.offer_meta_data( INSERT INTO public.offer_metadata(
offer_id, eligibility, discount_type, status, start_time,end_time, offer_id, eligibility, discount_type, status, start_time,end_time,
offer_desc,offer_type,rcpt_text) offer_desc,offer_type,rcpt_text)
VALUES (2,'elgibility','dicounted','InActive','2020-04-14 19:10:25','2020-04-15 19:10:25', VALUES (2,'elgibility','dicounted','InActive','2020-04-14 19:10:25','2020-04-15 19:10:25',
'20 percent','5','RCPT TXT'); '20 percent','5','RCPT TXT');
INSERT INTO public.offer_meta_data( INSERT INTO public.offer_metadata(
offer_id, eligibility, discount_type, status, start_time,end_time, offer_id, eligibility, discount_type, status, start_time,end_time,
offer_desc,offer_type,rcpt_text) offer_desc,offer_type,rcpt_text)
VALUES (3,'elgibility','dicounted','Active','2020-04-15 19:10:25','2020-04-16 19:10:25', VALUES (3,'elgibility','dicounted','Active','2020-04-15 19:10:25','2020-04-16 19:10:25',
'10 percent','5','RCPT TXT'); '10 percent','5','RCPT TXT');
INSERT INTO public.offer_meta_data( INSERT INTO public.offer_metadata(
offer_id, eligibility, discount_type, status, start_time,end_time, offer_id, eligibility, discount_type, status, start_time,end_time,
offer_desc,offer_type,rcpt_text) offer_desc,offer_type,rcpt_text)
VALUES (4,'elgibility','dicounted','Active','2020-04-1 19:10:25','2020-04-15 19:10:25', VALUES (4,'elgibility','dicounted','Active','2020-04-1 19:10:25','2020-04-15 19:10:25',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment