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

Commit 850a4791 by Sushant

docs(migrations): improve dialect options docs

1 parent 2874c549
...@@ -517,16 +517,14 @@ use the `--url` option to pass in a connection string. For example: ...@@ -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' $ npx sequelize db:migrate --url 'mysql://root:password@mysql_host.com/database_name'
``` ```
### Connecting over SSL ### Passing Dialect Specific Options
Ensure ssl is specified in both `dialectOptions` and in the base config.
```json ```json
{ {
"production": { "production": {
"dialect":"postgres", "dialect":"postgres",
"ssl": true,
"dialectOptions": { "dialectOptions": {
"ssl": true // dialect options like SSL etc here
} }
} }
} }
......
...@@ -64,12 +64,12 @@ const extensions = { ...@@ -64,12 +64,12 @@ const extensions = {
}; };
exports.extensions = extensions; exports.extensions = extensions;
/** Instance based validators */ // instance based validators
validator.isImmutable = function(value, validatorArgs, field, modelInstance) { validator.isImmutable = function(value, validatorArgs, field, modelInstance) {
return modelInstance.isNewRecord || modelInstance.dataValues[field] === modelInstance._previousDataValues[field]; return modelInstance.isNewRecord || modelInstance.dataValues[field] === modelInstance._previousDataValues[field];
}; };
/** Extra validators */ // extra validators
validator.notNull = function(val) { validator.notNull = function(val) {
return val !== null && val !== undefined; return val !== null && val !== undefined;
}; };
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
"lint-staged": "^7.3.0", "lint-staged": "^7.3.0",
"mariadb": "^2.0.1-beta", "mariadb": "^2.0.1-beta",
"mocha": "^5.x", "mocha": "^5.x",
"mysql2": "^1.x", "mysql2": "^1.6.4",
"pg": "^7.5.0", "pg": "^7.5.0",
"pg-hstore": "^2.x", "pg-hstore": "^2.x",
"pg-types": "^1.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!