Initial commit - WASL Digital Wallet

This commit is contained in:
Hamza-Ayed
2026-06-20 21:55:06 +03:00
commit 7306c47368
61 changed files with 4157 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
-- ─────────────────────────────────────────────────────────────
-- WASL — PostgreSQL initialization
-- Runs once when the postgres container initializes the data dir.
-- ─────────────────────────────────────────────────────────────
-- Ensure required extensions are enabled for the WASL database
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- gen_random_uuid() / uuid-ossp
CREATE EXTENSION IF NOT EXISTS "pgcrypto"; -- encryption helpers (pgp_sym_encrypt)
CREATE EXTENSION IF NOT EXISTS "citext"; -- case-insensitive text (emails)
CREATE EXTENSION IF NOT EXISTS "pg_trgm"; -- trigram fuzzy search (phone lookup)
CREATE EXTENSION IF NOT EXISTS "btree_gin"; -- composite GIN indexes
-- Create the test database if running in development
SELECT 'CREATE DATABASE wasl_testing OWNER wasl'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'wasl_testing')\gexec
-- Set default search path
ALTER DATABASE wasl SET search_path TO public;
ALTER DATABASE wasl SET timezone TO 'Asia/Damascus';