File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ LOG_LEVEL=debug
22
22
DB_CONNECTION = pgsql
23
23
DB_HOST = 127.0.0.1
24
24
DB_PORT = 5432
25
- DB_DATABASE = laralamma
25
+ DB_DATABASE = larallama
26
26
DB_USERNAME = postgres
27
27
DB_PASSWORD = secret
28
28
Original file line number Diff line number Diff line change @@ -7,11 +7,16 @@ export PGUSER="$POSTGRES_USER"
7
7
8
8
# Create the 'laralamma' template db
9
9
" ${psql[@]} " << - 'EOSQL '
10
- CREATE DATABASE laralamma IS_TEMPLATE true;
10
+ DO $$
11
+ BEGIN
12
+ IF NOT EXISTS (SELECT 1 FROM pg_database WHERE datname = 'larallama') THEN
13
+ CREATE DATABASE larallama IS_TEMPLATE true;
14
+ END IF;
15
+ END $$;
11
16
EOSQL
12
17
13
18
# Load PostGIS into both template_database and $POSTGRES_DB
14
- for DB in laralamma " $POSTGRES_DB " ; do
19
+ for DB in larallama " $POSTGRES_DB " ; do
15
20
echo " Loading PostGIS extensions into $DB "
16
21
" ${psql[@]} " --dbname=" $DB " << -'EOSQL '
17
22
CREATE EXTENSION IF NOT EXISTS postgis;
You can’t perform that action at this time.
0 commit comments