@stacksjs/buddy 0.70.109 → 0.70.110

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.
@@ -244,22 +244,27 @@ export function migrate(buddy) {
244
244
  if (options.auth !== !1) {
245
245
  log.debug("Migrating auth tables...");
246
246
  try {
247
- const { migrateAuthTables, migrateNotificationTables, migrateRbacTables } = await import("@stacksjs/database"), authResult = await migrateAuthTables({ verbose: options.verbose });
247
+ const { migrateAuthTables } = await import("@stacksjs/database"), authResult = await migrateAuthTables({ verbose: options.verbose });
248
248
  if (!authResult.success)
249
249
  log.error(`Failed to migrate auth tables: ${authResult.error}`);
250
- const notifResult = await migrateNotificationTables({ verbose: options.verbose });
250
+ } catch (error) {
251
+ log.error("Failed to migrate auth tables:", error);
252
+ }
253
+ }
254
+ const result = await runAction(Action.Migrate, options).finally(() => lock.release());
255
+ if (result.isErr)
256
+ log.error("Model migrations failed \u2014 applying notification/RBAC table guarantees before exiting.");
257
+ if (options.auth !== !1)
258
+ try {
259
+ const { migrateNotificationTables, migrateRbacTables } = await import("@stacksjs/database"), notifResult = await migrateNotificationTables({ verbose: options.verbose });
251
260
  if (!notifResult.success)
252
261
  log.error(`Failed to migrate notification tables: ${notifResult.error}`);
253
262
  const rbacResult = await migrateRbacTables({ verbose: options.verbose });
254
263
  if (!rbacResult.success)
255
264
  log.error(`Failed to migrate RBAC tables: ${rbacResult.error}`);
256
265
  } catch (error) {
257
- log.error("Failed to migrate auth/notification/RBAC tables:", error);
266
+ log.error("Failed to migrate notification/RBAC tables:", error);
258
267
  }
259
- }
260
- const result = await runAction(Action.Migrate, options).finally(() => lock.release());
261
- if (result.isErr)
262
- log.error("Model migrations failed.");
263
268
  if (result.isErr) {
264
269
  await outro("While running the migrate command, there was an issue", { startTime: perf, useSeconds: !0 }, result.error);
265
270
  process.exit(ExitCode.FatalError);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.70.109",
5
+ "version": "0.70.110",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [