@cadenza.io/service 1.6.0 → 1.6.1

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.
package/dist/index.js CHANGED
@@ -2498,9 +2498,14 @@ CREATE TRIGGER prevent_modification BEFORE UPDATE OR DELETE ON ${tableName} FOR
2498
2498
  (ctx) => __async(this, null, function* () {
2499
2499
  const { ddl } = ctx;
2500
2500
  if (ddl && ddl.length > 0) {
2501
- for (const sql of ddl) {
2502
- console.log("Applying SQL", sql);
2503
- yield this.dbClient.query(sql);
2501
+ try {
2502
+ for (const sql of ddl) {
2503
+ console.log("Applying SQL", sql);
2504
+ yield this.dbClient.query(sql);
2505
+ }
2506
+ } catch (error) {
2507
+ console.error("Error applying DDL", error);
2508
+ throw error;
2504
2509
  }
2505
2510
  }
2506
2511
  console.log("DDL applied");