Skip to content
This repository was archived by the owner on Oct 28, 2023. It is now read-only.

Commit 73871e7

Browse files
committed
Fixed database creation using db-migrate #9
Due to issue db-migrate/node-db-migrate#468 we have to make sure not to specify a database when running `db-migrate db:create`
1 parent c0d9416 commit 73871e7

File tree

3 files changed

+29
-8
lines changed

3 files changed

+29
-8
lines changed

.circleci/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- run:
3939
name: setup database
4040
# Create db and run all migrations
41-
command: node_modules/db-migrate/bin/db-migrate db:create anansi_db && node_modules/db-migrate/bin/db-migrate up
41+
command: node_modules/db-migrate/bin/db-migrate db:create anansi_db -e creation && node_modules/db-migrate/bin/db-migrate up
4242

4343
- run:
4444
name: test

database.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,12 @@
66
"user": "dbuser",
77
"password": {"ENV": "MYSQL_PASSWORD"},
88
"database": "anansi_db"
9+
},
10+
"creation": {
11+
"driver": "mysql",
12+
"host": "localhost",
13+
"user": "dbuser",
14+
"password": {"ENV": "MYSQL_PASSWORD"},
15+
"flags": "-CONNECT_WITH_DB"
916
}
1017
}

package-lock.json

Lines changed: 21 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)