Temporarily cast migration AsyncCollection to Collection pending #17

This commit is contained in:
Garrett Mills 2022-04-28 20:16:19 -05:00
parent de13030815
commit 30a23b1659
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@extollo/lib", "name": "@extollo/lib",
"version": "0.9.41", "version": "0.9.42",
"description": "The framework library that lifts up your code.", "description": "The framework library that lifts up your code.",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

View File

@ -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))