From 09182ead247169139ca179235f7a7ee5bd51ac85 Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Tue, 17 Nov 2020 03:36:15 +0200 Subject: [PATCH] Update init sql scripts --- db/initdb.d/10_ensl.setup.sql | 5 ++++- db/initdb.d/99_ensl.setup.sql | 12 ------------ 2 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 db/initdb.d/99_ensl.setup.sql diff --git a/db/initdb.d/10_ensl.setup.sql b/db/initdb.d/10_ensl.setup.sql index 5852bc4..971e64a 100644 --- a/db/initdb.d/10_ensl.setup.sql +++ b/db/initdb.d/10_ensl.setup.sql @@ -1,4 +1,7 @@ -- FIXME: this should be somewhere else probably +CREATE DATABASE IF NOT EXISTS ensl_production; +GRANT ALL PRIVILEGES ON ensl_production.* TO 'ensl'@'%' WITH GRANT OPTION; + CREATE DATABASE IF NOT EXISTS ensl_development; GRANT ALL PRIVILEGES ON ensl_development.* TO 'ensl'@'%' WITH GRANT OPTION; @@ -6,4 +9,4 @@ CREATE DATABASE IF NOT EXISTS ensl_test; GRANT ALL PRIVILEGES ON ensl_test.* TO 'ensl'@'%' WITH GRANT OPTION; CREATE DATABASE IF NOT EXISTS ensl_staging; -GRANT ALL PRIVILEGES ON ensl_staging.* TO 'ensl'@'%' WITH GRANT OPTION; \ No newline at end of file +GRANT ALL PRIVILEGES ON ensl_staging.* TO 'ensl'@'%' WITH GRANT OPTION; diff --git a/db/initdb.d/99_ensl.setup.sql b/db/initdb.d/99_ensl.setup.sql deleted file mode 100644 index ae9d956..0000000 --- a/db/initdb.d/99_ensl.setup.sql +++ /dev/null @@ -1,12 +0,0 @@ --- FIXME: this should be somewhere else probably -CREATE DATABASE IF NOT EXISTS ensl; -GRANT ALL PRIVILEGES ON ensl.* TO 'ensl'@'%' WITH GRANT OPTION; - -CREATE DATABASE IF NOT EXISTS ensl_development; -GRANT ALL PRIVILEGES ON ensl_development.* TO 'ensl'@'%' WITH GRANT OPTION; - -CREATE DATABASE IF NOT EXISTS ensl_test; -GRANT ALL PRIVILEGES ON ensl_test.* TO 'ensl'@'%' WITH GRANT OPTION; - -CREATE DATABASE IF NOT EXISTS ensl_staging; -GRANT ALL PRIVILEGES ON ensl_staging.* TO 'ensl'@'%' WITH GRANT OPTION;