Created
November 6, 2021 19:58
-
-
Save hakimkal/4ab9eca487aba70fb83903705df78bca to your computer and use it in GitHub Desktop.
Postgres schema sql
This file contains hidden or 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
| 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