@orion-studios/cms 0.5.9 → 0.5.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orion-studios/cms",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "Orion CMS v2 core engine \u2014 JSONB content model on Supabase primitives",
5
5
  "type": "module",
6
6
  "exports": {
package/sql/bootstrap.sql CHANGED
@@ -164,6 +164,12 @@ where scheduled_version_id is not null
164
164
 
165
165
  create unique index if not exists cms_page_versions_page_id_id_idx
166
166
  on cms_page_versions (page_id, id);
167
+ create index if not exists cms_pages_draft_version_fk_idx
168
+ on cms_pages (id, draft_version_id);
169
+ create index if not exists cms_pages_published_version_fk_idx
170
+ on cms_pages (id, published_version_id);
171
+ create index if not exists cms_pages_scheduled_version_fk_idx
172
+ on cms_pages (id, scheduled_version_id);
167
173
  create index if not exists cms_pages_scheduled_publish_due_idx
168
174
  on cms_pages (publish_at)
169
175
  where publish_at is not null and scheduled_version_id is not null;
@@ -0,0 +1,11 @@
1
+ -- Cover the three composite foreign keys from cms_pages to cms_page_versions.
2
+ -- PostgreSQL does not create indexes on the referencing columns automatically.
3
+
4
+ create index if not exists cms_pages_draft_version_fk_idx
5
+ on cms_pages (id, draft_version_id);
6
+
7
+ create index if not exists cms_pages_published_version_fk_idx
8
+ on cms_pages (id, published_version_id);
9
+
10
+ create index if not exists cms_pages_scheduled_version_fk_idx
11
+ on cms_pages (id, scheduled_version_id);