@easy-cms/drizzle 0.22.2 → 0.24.0

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -171,7 +171,7 @@ import { SchemaError } from "@easy-cms/core";
171
171
 
172
172
  // src/schema.ts
173
173
  import { createHash } from "crypto";
174
- import { ConfigError } from "@easy-cms/core";
174
+ import { ConfigError, isHasMany } from "@easy-cms/core";
175
175
  function tableModels(schema) {
176
176
  const all = [];
177
177
  const walk = (model) => {
@@ -353,7 +353,7 @@ function buildTable(builder, name, kind, fields, options) {
353
353
  ...localeInfo(localization)
354
354
  });
355
355
  described.push([base, "array", child.name]);
356
- } else if ((field.type === "select" || field.type === "relationship") && field.hasMany) {
356
+ } else if (isHasMany(field)) {
357
357
  const localization = field.localized ? builder.localization : null;
358
358
  const child = buildTable(builder, `${name}__${base}`, "values", [], {
359
359
  parentIdKind: kind === "array" ? "text" : "integer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-cms/drizzle",
3
- "version": "0.22.2",
3
+ "version": "0.24.0",
4
4
  "description": "Shared Drizzle ORM layer for Easy CMS database adapters",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,10 +23,10 @@
23
23
  "drizzle-orm": "0.45.3"
24
24
  },
25
25
  "peerDependencies": {
26
- "@easy-cms/core": "^0.22.2"
26
+ "@easy-cms/core": "^0.24.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@easy-cms/core": "^0.22.2"
29
+ "@easy-cms/core": "^0.24.0"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"