npm package diff
Package: @forge/sql
Versions: 2.2.3 - 2.3.0-next.0
File: package/out/migration.js
Index: package/out/migration.js
===================================================================
--- package/out/migration.js
+++ package/out/migration.js
@@ -13,9 +13,9 @@
this.sqlClient = sqlClient;
this.migrations = [];
}
async initialize() {
- await this.sqlClient.executeRaw(SCHEMA_VERSION_TABLE_CREATE_QUERY);
+ await this.sqlClient.executeDDL(SCHEMA_VERSION_TABLE_CREATE_QUERY);
}
enqueue(name, statement) {
if (this.migrations.some((migration) => migration.name === name)) {
return this;
@@ -26,9 +26,9 @@
getEnqueued() {
return this.migrations;
}
async list() {
- const result = await this.sqlClient.executeRaw(LIST_MIGRATIONS_QUERY);
+ const result = await this.sqlClient.executeDDL(LIST_MIGRATIONS_QUERY);
const migrations = new Array();
for (const row of result.rows) {
const migratedAt = new Date(row.migratedAt);
const id = row.id;
@@ -43,9 +43,9 @@
const migrationsToRun = this.migrations.filter((migration) => !previousMigrations.some((prev) => prev.name === migration.name));
const migrationsSuccessfullyRun = [];
for (const migration of migrationsToRun) {
try {
- await this.sqlClient.executeRaw(migration.statement);
+ await this.sqlClient.executeDDL(migration.statement);
}
catch (error) {
throw new errors_1.MigrationExecutionError(migration.name, migrationsToRun.map((m) => m.name));
}