@easy-cms/drizzle 0.20.1 → 0.21.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
@@ -386,9 +386,9 @@ function buildTable(builder, name, kind, fields, options) {
386
386
  defaultLocale: locale === localization?.defaultLocale
387
387
  }
388
388
  );
389
- if (topLevel && kind === "root" && (field.unique || field.type === "slug")) {
389
+ if (topLevel && kind === "root" && (field.unique || field.type === "slug" && field.uniqueWithin === void 0)) {
390
390
  indexes.push({ column, unique: true });
391
- } else if (field.index || field.unique || field.type === "relationship" || field.type === "upload") {
391
+ } else if (field.index || field.unique || field.type === "slug" || field.type === "relationship" || field.type === "upload") {
392
392
  indexes.push({ column, unique: false });
393
393
  }
394
394
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easy-cms/drizzle",
3
- "version": "0.20.1",
3
+ "version": "0.21.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.20.1"
26
+ "@easy-cms/core": "^0.21.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@easy-cms/core": "^0.20.1"
29
+ "@easy-cms/core": "^0.21.0"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"