-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinit.sql
More file actions
29 lines (24 loc) · 914 Bytes
/
init.sql
File metadata and controls
29 lines (24 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
-- Check and create 'auth_db'
SELECT 'CREATE DATABASE user_db'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'user_db')
\gexec
-- Check and create 'notification_db'
SELECT 'CREATE DATABASE notification_db'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'notification_db')
\gexec
-- Check and create 'payment_db'
SELECT 'CREATE DATABASE payment_db'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'payment_db')
\gexec
-- Check and create 'queue_db'
SELECT 'CREATE DATABASE queue_db'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'queue_db')
\gexec
-- Check and create 'reservation_db'
SELECT 'CREATE DATABASE reservation_db'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'reservation_db')
\gexec
-- Check and create 'restaurant_db'
SELECT 'CREATE DATABASE restaurant_db'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'restaurant_db')
\gexec