@ghom/orm 1.8.2 → 1.8.4

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/app/orm.d.ts CHANGED
@@ -2,7 +2,7 @@ import { Handler } from "@ghom/handler";
2
2
  import { Knex } from "knex";
3
3
  import { TextStyle } from "./util.js";
4
4
  import { Table } from "./table.js";
5
- import { ResponseCache } from "./caching";
5
+ import { ResponseCache } from "./caching.js";
6
6
  export interface ILogger {
7
7
  log: (message: string) => void;
8
8
  error: (error: string | Error) => void;
package/dist/app/orm.js CHANGED
@@ -3,8 +3,8 @@ import { Handler } from "@ghom/handler";
3
3
  import { default as knex } from "knex";
4
4
  import { isCJS } from "./util.js";
5
5
  import { Table } from "./table.js";
6
+ import { ResponseCache } from "./caching.js";
6
7
  import { backupTable, restoreBackup, disableForeignKeys, enableForeignKeys, } from "./backup.js";
7
- import { ResponseCache } from "./caching";
8
8
  export class ORM {
9
9
  config;
10
10
  _ready = false;
@@ -43,7 +43,10 @@ export class ORM {
43
43
  */
44
44
  async init() {
45
45
  await this.handler.init();
46
- await enableForeignKeys(this);
46
+ try {
47
+ await enableForeignKeys(this);
48
+ }
49
+ catch { }
47
50
  this.handler.elements.set("migration", new Table({
48
51
  name: "migration",
49
52
  priority: Infinity,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghom/orm",
3
- "version": "1.8.2",
3
+ "version": "1.8.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",