Skip to content

Commit 509b8f6

Browse files
committed
Fix the order of SQL commands in 00-initialize.sql to be more logical.
1 parent df4b78b commit 509b8f6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

azuredbmock/00-initialize.sql

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,22 @@ GRANT ALL ON DATABASE xxx_db_jore3importer_name_xxx TO xxx_db_jore3importer_user
3838
CREATE DATABASE xxx_db_timetables_name_xxx;
3939
GRANT CREATE ON DATABASE xxx_db_timetables_name_xxx TO xxx_db_hasura_username_xxx;
4040

41-
-- create database for stop registry and give ALL privileges to Tiamat in it
42-
CREATE DATABASE xxx_db_tiamat_name_xxx;
43-
GRANT ALL ON DATABASE xxx_db_tiamat_name_xxx TO xxx_db_tiamat_username_xxx;
41+
-- interval outputs by default are using the sql format ('3 4:05:06'). Here we are switching to ISO 8601 format ('P3DT4H5M6S')
42+
ALTER DATABASE xxx_db_timetables_name_xxx SET intervalstyle = 'iso_8601';
4443

4544
-- switch database context to timetables db to be able to add extensions there
4645
\connect xxx_db_timetables_name_xxx;
46+
4747
CREATE EXTENSION IF NOT EXISTS pgcrypto;
4848
CREATE EXTENSION IF NOT EXISTS btree_gist;
4949

50-
-- interval outputs by default are using the sql format ('3 4:05:06'). Here we are switching to ISO 8601 format ('P3DT4H5M6S')
51-
ALTER DATABASE xxx_db_timetables_name_xxx SET intervalstyle = 'iso_8601';
50+
-- create database for stop registry and give ALL privileges to Tiamat in it
51+
CREATE DATABASE xxx_db_tiamat_name_xxx;
52+
GRANT ALL ON DATABASE xxx_db_tiamat_name_xxx TO xxx_db_tiamat_username_xxx;
5253

5354
-- switch database context to stop db to initialize it to the state where tiamat can use it
5455
\connect xxx_db_tiamat_name_xxx;
56+
5557
CREATE SCHEMA topology;
5658
ALTER SCHEMA topology OWNER TO xxx_db_tiamat_username_xxx;
5759
CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;

0 commit comments

Comments
 (0)