Skip to content

Commit ddc0045

Browse files
Merge pull request #24 from manelferreira/feature/add-database-cli-options
Removed console log line; added the new options to the readme
2 parents 4e9b003 + 8d593cd commit ddc0045

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,35 @@ The commands (those that have some option) and it's options are presented below:
124124
- migrations up
125125
```
126126
--rollback / -r .......... Rolls back applied migrations in case of error (default is false)
127+
--dbDialect ........................ Specify the database dialect (one of: 'mysql', 'mariadb', 'postgres', 'mssql')
128+
--dbHost ........................... Specify the database host
129+
--dbPort ........................... Specify the database port
130+
--dbName ........................... Specify the database name
131+
--dbUsername ....................... Specify the database username
132+
--dbPassword ....................... Specify the database password
127133
```
128134

129135
- migrations down
130136
```
131137
--times / -t ............. Specify how many times to roll back (default is 1)
132138
--name / -n .............. Specify the name of the migration to be rolled back (e.g. "--name create-users.js")
139+
--dbDialect ........................ Specify the database dialect (one of: 'mysql', 'mariadb', 'postgres', 'mssql')
140+
--dbHost ........................... Specify the database host
141+
--dbPort ........................... Specify the database port
142+
--dbName ........................... Specify the database name
143+
--dbUsername ....................... Specify the database username
144+
--dbPassword ....................... Specify the database password
133145
```
134146

135147
- migrations list
136148
```
137149
--status / -s ............ Specify the status of migrations to be listed (--status pending [default] or --status executed)
150+
--dbDialect ........................ Specify the database dialect (one of: 'mysql', 'mariadb', 'postgres', 'mssql')
151+
--dbHost ........................... Specify the database host
152+
--dbPort ........................... Specify the database port
153+
--dbName ........................... Specify the database name
154+
--dbUsername ....................... Specify the database username
155+
--dbPassword ....................... Specify the database password
138156
```
139157

140158
### Custom migrations path

lib/databaseConnectionUrlBuilder.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ module.exports = class DatabaseConnectionUrlBuilder {
4646
PASSWORD: this.getDbPasswordIndividualProperty()
4747
};
4848

49-
console.log(connectionProperties);
50-
5149
return `${connectionProperties.DIALECT}`
5250
+ `://${connectionProperties.USERNAME}`
5351
+ `:${connectionProperties.PASSWORD}`

0 commit comments

Comments
 (0)