Skip to content

Commit d9c416f

Browse files
committed
PoolPlus: Remove deprecation error in constructor
An error is no longer thrown if the passed in config contains the "allowAlterInProduction" or "migrationStrategy" properties.
1 parent 4bcbd91 commit d9c416f

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

lib/PoolPlus.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ function validateMigrationStrategy(strategy) {
3535
*/
3636
class PoolPlus extends Pool {
3737
constructor(config) {
38-
// TODO: Remove before v0.7.0 is released
39-
if ('allowAlterInProduction' in config || 'migrationStrategy' in config) {
40-
throw new Error(
41-
'The `allowAlterInProduction` and `migrationStrategy` options must now be namespaced under ' +
42-
'a `plusOptions` property in the config. See the documentation for more information: ' +
43-
'https://github.com/nwoltman/node-mysql-plus#module_mysql-plus..createPool'
44-
);
45-
}
46-
4738
const plusOptions = config.plusOptions || {};
4839
validateMigrationStrategy(plusOptions.migrationStrategy);
4940

test/unit/PoolPlus.test.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ describe('PoolPlus', () => {
4949
);
5050
});
5151

52-
// TODO: Remove before v0.7.0 is released
53-
it('should throw if the PoolPlus options are not in the `plusOptions` property', () => {
54-
should.throws(() => new PoolPlus({migrationStrategy: 'alter'}));
55-
should.throws(() => new PoolPlus({allowAlterInProduction: false}));
56-
});
57-
5852
});
5953

6054

0 commit comments

Comments
 (0)