不要怂,就是干,撸起袖子干!

Commit 850a4791 by Sushant

docs(migrations): improve dialect options docs

1 parent 2874c549
......@@ -185,7 +185,7 @@ module.exports = {
up: (queryInterface, Sequelize) => {
// logic for transforming into the new state
},
down: (queryInterface, Sequelize) => {
// logic for reverting the changes
}
......@@ -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
}
}
}
......
......@@ -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;
};
......
......@@ -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",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!