|
|
@ -140,12 +140,13 @@ export class DatabaseMigrator extends Migrator {
|
|
|
|
* @protected
|
|
|
|
* @protected
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
protected async filterAppliedMigrations(identifiers: string[]): Promise<string[]> {
|
|
|
|
protected async filterAppliedMigrations(identifiers: string[]): Promise<string[]> {
|
|
|
|
const existing = await this.builder()
|
|
|
|
const existing = (await this.builder()
|
|
|
|
.connection('default')
|
|
|
|
.connection('default')
|
|
|
|
.select('identifier')
|
|
|
|
.select('identifier')
|
|
|
|
.from('migrations')
|
|
|
|
.from('migrations')
|
|
|
|
.whereIn('identifier', identifiers)
|
|
|
|
.whereIn('identifier', identifiers)
|
|
|
|
.get()
|
|
|
|
.get()
|
|
|
|
|
|
|
|
.collect())
|
|
|
|
.pluck<string>('identifier')
|
|
|
|
.pluck<string>('identifier')
|
|
|
|
|
|
|
|
|
|
|
|
return identifiers.filter(id => !existing.includes(id))
|
|
|
|
return identifiers.filter(id => !existing.includes(id))
|
|
|
|