-
Notifications
You must be signed in to change notification settings - Fork 345
Labels
enhancementNew feature or requestNew feature or requestmigrationsRelated to migrationsRelated to migrations
Description
Hi, it seems migrator.js
attempts to create schema even when it already exists:
async #ensureMigrationTableExists(): Promise<void> {
if (!(await this.#doesTableExists(this.#migrationTable))) {
try {
if (this.#migrationTableSchema) {
// ⚠️ note the absence of existence check here,
// the whole block is also likely redundant
await this.#createIfNotExists(
this.#props.db.schema.createSchema(this.#migrationTableSchema),
)
}
I think this should have been taken care of by:
async #ensureMigrationTablesExists(): Promise<void> {
await this.#ensureMigrationTableSchemaExists() // ✔️ creates schema
await this.#ensureMigrationTableExists() // ✔️ uses it
await this.#ensureMigrationLockTableExists()
await this.#ensureLockRowExists()
}
Or am I missing something?
In practice this breaks my use case with custom Oracle 19 adapter built with kysely-oracledb.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestmigrationsRelated to migrationsRelated to migrations