Skip to content

Commit

Permalink
added port config var to migrate-db.js and .env (#22395)
Browse files Browse the repository at this point in the history
Added port config variable to the migrate-db.js script and .env.local.example files. This allows users to set the port for remote databases like Digital Ocean that don't use the default port.
  • Loading branch information
unimprobable authored Feb 22, 2021
1 parent 85f7efa commit f9de10f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/with-mysql/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ MYSQL_HOST=
MYSQL_DATABASE=
MYSQL_USERNAME=
MYSQL_PASSWORD=
MYSQL_PORT=
1 change: 1 addition & 0 deletions examples/with-mysql/lib/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const db = mysql({
database: process.env.MYSQL_DATABASE,
user: process.env.MYSQL_USERNAME,
password: process.env.MYSQL_PASSWORD,
port: process.env.MYSQL_PORT,
},
})

Expand Down
1 change: 1 addition & 0 deletions examples/with-mysql/scripts/migrate-db.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const db = mysql({
database: process.env.MYSQL_DATABASE,
user: process.env.MYSQL_USERNAME,
password: process.env.MYSQL_PASSWORD,
port: process.env.MYSQL_PORT,
},
})

Expand Down

0 comments on commit f9de10f

Please sign in to comment.