Skip to content

Commit

Permalink
docs(migrations): improve dialect options docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sushantdhiman committed Dec 9, 2018
1 parent 2874c54 commit 850a479
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions docs/migrations.md
Expand Up @@ -185,7 +185,7 @@ module.exports = {
up: (queryInterface, Sequelize) => {
// logic for transforming into the new state
},

down: (queryInterface, Sequelize) => {
// logic for reverting the changes
}
Expand Down Expand Up @@ -517,16 +517,14 @@ use the `--url` option to pass in a connection string. For example:
$ npx sequelize db:migrate --url 'mysql://root:password@mysql_host.com/database_name'
```

### Connecting over SSL
Ensure ssl is specified in both `dialectOptions` and in the base config.
### Passing Dialect Specific Options

```json
{
"production": {
"dialect":"postgres",
"ssl": true,
"dialectOptions": {
"ssl": true
// dialect options like SSL etc here
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/validator-extras.js
Expand Up @@ -64,12 +64,12 @@ const extensions = {
};
exports.extensions = extensions;

/** Instance based validators */
// instance based validators
validator.isImmutable = function(value, validatorArgs, field, modelInstance) {
return modelInstance.isNewRecord || modelInstance.dataValues[field] === modelInstance._previousDataValues[field];
};

/** Extra validators */
// extra validators
validator.notNull = function(val) {
return val !== null && val !== undefined;
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -66,7 +66,7 @@
"lint-staged": "^7.3.0",
"mariadb": "^2.0.1-beta",
"mocha": "^5.x",
"mysql2": "^1.x",
"mysql2": "^1.6.4",
"pg": "^7.5.0",
"pg-hstore": "^2.x",
"pg-types": "^1.x",
Expand Down

0 comments on commit 850a479

Please sign in to comment.