Commit e82c5c8e authored by Kali Padhi's avatar Kali Padhi

Update readme.md

parent 8d6695ec
# Offer Transaction Service
## Steps to install and run the application
Download and Install Postgress In Docker :: Download and Install Postgress In Docker ::
```bash
docker pull postgres docker pull postgres
docker run -d -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password123 --name postgres -p 5432:5432 --restart=always postgres docker run -d -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password123 --name postgres -p 5432:5432 --restart=always postgres
```
Download and install pgadmin Download and install pgadmin
```bash
https://www.postgresql.org/ftp/pgadmin/pgadmin4/v4.19/windows/ https://www.postgresql.org/ftp/pgadmin/pgadmin4/v4.19/windows/
after installation start the pg admin by use below url after installation start the pg admin by use below url
http://127.0.0.1:58283/browser/# http://127.0.0.1:58283/browser/#
```
Once you start it will ask to create a master password Once you start it will ask to create a master password
Go to Add New Server --> Give any database name --> go to connection tab and provide below details Go to Add New Server --> Give any database name --> go to connection tab and provide below details
```bash
Host = 127.0.0.1 Host = 127.0.0.1
Port = 5432 Port = 5432
username = user username = user
password = password123 password = password123
```
Then click on save Then click on save
In Header click on Tool -> Query Tool --> and paste the below query In Header click on Tool -> Query Tool --> and paste the below query
=================================================== ```bash
-- Table: public.offerlookup -- Table: public.offerlookup
-- DROP TABLE public.offerlookup; -- DROP TABLE public.offerlookup;
...@@ -47,18 +55,18 @@ TABLESPACE pg_default; ...@@ -47,18 +55,18 @@ TABLESPACE pg_default;
ALTER TABLE public.offerlookup ALTER TABLE public.offerlookup
OWNER to "postgress"; OWNER to "postgress";
==================================================== ```
```bash
Once you create use the below query to insert a data Once you create use the below query to insert a data
INSERT INTO public.offerlookup( INSERT INTO public.offerlookup(
offer_lookup_id, store_id, terminal, offer_type, offer_id, pre_condition) offer_lookup_id, store_id, terminal, offer_type, offer_id, pre_condition)
VALUES ('1234567890','0001','002','UPC','01','AND'); VALUES ('1234567890','0001','002','UPC','01','AND');
```
```bash
Create a table for end of sale Create a table for end of sale
==============================
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
...@@ -69,7 +77,9 @@ CREATE TABLE endofsale( ...@@ -69,7 +77,9 @@ CREATE TABLE endofsale(
isprocessed boolean isprocessed boolean
); );
```
```bash
dummy data dummy data
========== ==========
...@@ -77,22 +87,7 @@ dummy data ...@@ -77,22 +87,7 @@ dummy data
INSERT INTO endofsale VALUES ( uuid_generate_v4() , INSERT INTO endofsale VALUES ( uuid_generate_v4() ,
'{"name": "Paint house", "tags": ["Improvements", "Office"], "finished": true}', '{"name": "Paint house", "tags": ["Improvements", "Office"], "finished": true}',
'{"name": "Paint house", "tags": ["Improvements", "Office"], "finished": true}' ); '{"name": "Paint house", "tags": ["Improvements", "Office"], "finished": true}' );
```
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