Skip to content

Instantly share code, notes, and snippets.

@hakimkal
Created November 6, 2021 19:58
Show Gist options
  • Select an option

  • Save hakimkal/4ab9eca487aba70fb83903705df78bca to your computer and use it in GitHub Desktop.

Select an option

Save hakimkal/4ab9eca487aba70fb83903705df78bca to your computer and use it in GitHub Desktop.
Postgres schema sql
create database merchant_wallet_manaager_db;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
create table if not exists merchant_profile
(
id uuid not null unique primary key,
name varchar default 100,
email varchar default 100,
secret varchar default 100,
is_active boolean default false,
created_at timestamp,
updated_at timestamp
);
create table if not exists merchant_wallet
(
id uuid not null unique
primary key,
merchant_profile_id uuid,
previous_balance varchar default 100,
current_balance varchar default 100,
created_at timestamp,
FOREIGN KEY (merchant_profile_id)
REFERENCES merchant_profile (id)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment