-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path10_create_basic_structure.sql
28 lines (25 loc) · 2.41 KB
/
10_create_basic_structure.sql
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
/***
* ███████╗██╗ ██╗██╗████████╗ ██████╗██╗ ██╗ ███████╗ ██████╗██╗ ██╗███████╗███╗ ███╗ █████╗
* ██╔════╝██║ ██║██║╚══██╔══╝██╔════╝██║ ██║ ██╔════╝██╔════╝██║ ██║██╔════╝████╗ ████║██╔══██╗
* ███████╗██║ █╗ ██║██║ ██║ ██║ ███████║ ███████╗██║ ███████║█████╗ ██╔████╔██║███████║
* ╚════██║██║███╗██║██║ ██║ ██║ ██╔══██║ ╚════██║██║ ██╔══██║██╔══╝ ██║╚██╔╝██║██╔══██║
* ███████║╚███╔███╔╝██║ ██║ ╚██████╗██║ ██║ ███████║╚██████╗██║ ██║███████╗██║ ╚═╝ ██║██║ ██║
* ╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
*
* TO km_languages_model database
*/
create schema if not exists error;
create schema if not exists const;
create schema if not exists unsecure; -- functions without any permission validation
create schema if not exists helpers;
create schema if not exists ext;
create schema if not exists auth;
create schema if not exists internal;
alter default privileges
in schema public, auth, const
grant select, insert, update, delete on tables to km_languages_model;
alter default privileges
in schema public, helpers, ext, unsecure grant usage, select on sequences to km_languages_model;
alter role km_languages_model set search_path to public, const, ext, helpers, unsecure, auth;
set search_path = public, const, ext, helpers, unsecure, auth;
ALTER DATABASE km_languages_model SET search_path TO public, ext, helpers, unsecure, auth;