@oktis-works/cms 0.10.3 → 0.10.5

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.
@@ -0,0 +1,20 @@
1
+ -- +migrate Up
2
+ -- Add unique constraint for content (tenant_id, type, slug) to support ON CONFLICT in seed
3
+ -- This is required for the demo content seed to work with ON CONFLICT specification
4
+
5
+ -- First, remove any duplicate entries that would violate the unique constraint
6
+ DELETE FROM content a
7
+ WHERE a.ctid <> (
8
+ SELECT min(b.ctid)
9
+ FROM content b
10
+ WHERE b.tenant_id = a.tenant_id
11
+ AND b.type = a.type
12
+ AND b.slug = a.slug
13
+ );
14
+
15
+ -- Add unique constraint
16
+ ALTER TABLE content
17
+ ADD CONSTRAINT uq_content_tenant_type_slug UNIQUE (tenant_id, type, slug);
18
+
19
+ -- +migrate Down
20
+ ALTER TABLE content DROP CONSTRAINT IF EXISTS uq_content_tenant_type_slug;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oktis-works/cms",
3
- "version": "0.10.3",
3
+ "version": "0.10.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,8 +22,8 @@
22
22
  "dependencies": {
23
23
  "@oktis-works/auth": "^0.7.5",
24
24
  "@oktis-works/config": "^0.6.4",
25
- "@oktis-works/core": "^0.10.0",
26
- "@oktis-works/database": "^0.10.0",
25
+ "@oktis-works/core": "^0.10.2",
26
+ "@oktis-works/database": "^0.10.2",
27
27
  "@oktis-works/validation": "^0.7.0",
28
28
  "@oktis-works/theme-runtime": "^0.7.0"
29
29
  },