Files
digifi-Core/SQL/salaryloan.sql
T
2025-02-09 18:09:11 -05:00

22 lines
760 B
SQL

CREATE DATABASE salaryloan;
CREATE user salaryloan with encrypted password 'salaryloan';
GRANT all privileges on database salaryloan to salaryloan;
CREATE TABLE demo_bank_accounts (
id SERIAL,
uid uuid DEFAULT uuid_generate_v4(),
name VARCHAR(125),
offers INT DEFAULT 0,
salary_account INT DEFAULT 0,
current_loans INT DEFAULT 0,
mobile VARCHAR(25) UNIQUE NOT NULL,
bvn VARCHAR(12) UNIQUE NOT NULL,
email VARCHAR(125),
pin VARCHAR(6),
added timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY demo_bank_accounts
ADD CONSTRAINT demo_bank_accounts_id_key UNIQUE (id);