@oktis-works/cms 0.10.2 → 0.10.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.
@@ -0,0 +1,24 @@
1
+ -- +migrate Up
2
+ -- WordPress-style timezone system
3
+ -- 1. Add published_at_gmt to content table for dual date storage (local + GMT)
4
+ -- 2. Add timezone settings to settings table (handled by seed)
5
+
6
+ -- Add published_at_gmt column to content table
7
+ ALTER TABLE content ADD COLUMN IF NOT EXISTS published_at_gmt TIMESTAMP WITH TIME ZONE;
8
+
9
+ -- Index for GMT-based queries (archives, scheduling, etc.)
10
+ CREATE INDEX IF NOT EXISTS idx_content_published_gmt ON content(published_at_gmt) WHERE published_at_gmt IS NOT NULL;
11
+
12
+ -- Backfill existing published content: published_at_gmt = published_at AT TIME ZONE 'UTC'
13
+ -- Note: existing published_at was stored as local time without TZ info
14
+ -- We assume it was stored in the server's timezone (typically UTC)
15
+ -- This is a best-effort backfill
16
+ UPDATE content
17
+ SET published_at_gmt = published_at AT TIME ZONE 'UTC'
18
+ WHERE published_at IS NOT NULL
19
+ AND published_at_gmt IS NULL
20
+ AND status = 'PUBLISHED';
21
+
22
+ -- +migrate Down
23
+ DROP INDEX IF EXISTS idx_content_published_gmt;
24
+ ALTER TABLE content DROP COLUMN IF EXISTS published_at_gmt;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oktis-works/cms",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,10 +20,10 @@
20
20
  "clean": "rm -rf dist migrations tsconfig.tsbuildinfo"
21
21
  },
22
22
  "dependencies": {
23
- "@oktis-works/auth": "^0.7.4",
23
+ "@oktis-works/auth": "^0.7.5",
24
24
  "@oktis-works/config": "^0.6.4",
25
- "@oktis-works/core": "^0.9.0",
26
- "@oktis-works/database": "^0.9.0",
25
+ "@oktis-works/core": "^0.10.1",
26
+ "@oktis-works/database": "^0.10.1",
27
27
  "@oktis-works/validation": "^0.7.0",
28
28
  "@oktis-works/theme-runtime": "^0.7.0"
29
29
  },