@@ -13,7 +13,7 @@ import {
1313 NonExistentMigrationError ,
1414 NonUniqueMigrationSequenceError ,
1515} from './errors'
16- import { MigrationSequence } from './interfaces'
16+ import { MassiveActionHandlerOptions , MigrationSequence } from './interfaces'
1717import { Migration } from './Migration'
1818import { MigrationRunner } from './MigrationRunner'
1919
@@ -38,14 +38,16 @@ export class MassiveActionHandler extends AbstractActionHandler {
3838 protected allMigrations : Migration [ ] = [ ]
3939 protected migrationSequenceByName : { [ key : string ] : MigrationSequence } = { }
4040 protected cyanauditEnabled : boolean = false
41+ protected dbSchema : string
4142
4243 constructor (
4344 protected handlerVersions : HandlerVersion [ ] ,
4445 protected massiveInstance : Database ,
45- protected dbSchema : string = 'public' ,
4646 protected migrationSequences : MigrationSequence [ ] = [ ] ,
47+ options : MassiveActionHandlerOptions ,
4748 ) {
48- super ( handlerVersions )
49+ super ( handlerVersions , options )
50+ this . dbSchema = options . dbSchema ? options . dbSchema : 'public'
4951 for ( const migrationSequence of migrationSequences ) {
5052 if ( this . migrationSequenceByName . hasOwnProperty ( migrationSequence . sequenceName ) ) {
5153 throw new NonUniqueMigrationSequenceError ( )
0 commit comments