Skip to content

Commit

Permalink
fix(schema): ensure database exists before dropping schema
Browse files Browse the repository at this point in the history
Closes #3713
  • Loading branch information
B4nan committed Nov 10, 2022
1 parent 0741633 commit fd4c416
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/knex/src/schema/SchemaGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export class SchemaGenerator extends AbstractSchemaGenerator<AbstractSqlDriver>
return this.dropDatabase(name);
}

await this.ensureDatabase();
const sql = await this.getDropSchemaSQL(options);
await this.execute(sql);
}
Expand Down

0 comments on commit fd4c416

Please sign in to comment.