forge-sql-orm 2.0.26 → 2.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1273,7 +1273,7 @@ const applySchemaMigrations = async (migration) => {
1273
1273
  const successfulMigrations = await migrations2.run();
1274
1274
  console.info("Migrations applied:", successfulMigrations);
1275
1275
  const migrationList = await sql$1.migrationRunner.list();
1276
- const migrationHistory = Array.isArray(migrationList) && migrationList.length > 0 ? migrationList.map((y) => `${y.id}, ${y.name}, ${y.migratedAt.toUTCString()}`).join("\n") : "No migrations found";
1276
+ const migrationHistory = Array.isArray(migrationList) && migrationList.length > 0 ? migrationList.sort((a, b) => a.migratedAt.getTime() - b.migratedAt.getTime()).map((y) => `${y.id}, ${y.name}, ${y.migratedAt.toUTCString()}`).join("\n") : "No migrations found";
1277
1277
  console.info("Migrations history:\nid, name, migrated_at\n", migrationHistory);
1278
1278
  return {
1279
1279
  headers: { "Content-Type": ["application/json"] },
@@ -1282,7 +1282,12 @@ const applySchemaMigrations = async (migration) => {
1282
1282
  body: "Migrations successfully executed"
1283
1283
  };
1284
1284
  } catch (error) {
1285
- console.error("Error during migration:", error);
1285
+ try {
1286
+ console.error("Error during migration:", JSON.stringify(error));
1287
+ } catch (e) {
1288
+ console.trace("Error stringify:", e);
1289
+ console.error("Error during migration:", error);
1290
+ }
1286
1291
  return {
1287
1292
  headers: { "Content-Type": ["application/json"] },
1288
1293
  statusCode: 500,