Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9829b40
feat(content): ✨ scaffold visibility, duplication and id strategy con…
claude Oct 7, 2026
1f31702
feat(content): ✨ duplicate content records as drafts
claude Oct 7, 2026
01c5493
feat(content): ✨ record-level hide and unhide
claude Oct 7, 2026
998b89c
feat(content): ✨ AdminCP duplicate and hide/unhide, blog wiring
claude Oct 7, 2026
123ffe6
feat(content): ✨ configurable id strategy (serial, uuid, bigint) in t…
claude Oct 7, 2026
0fdca17
feat(content): uuid and bigint demo types, id strategy tests, Elastic…
claude Oct 7, 2026
b6c69eb
fix(example): 🐛 serve the bigint event type's delivery URLs
claude Oct 7, 2026
0739e9e
fix(content): 🐛 read uuid and bigint ids in the AdminCP client
claude Oct 7, 2026
0239721
feat(content): ✨ key live editing and AI translation sources by id st…
claude Oct 11, 2026
52e43cf
fix(example): 🐛 render the event body as canary's rich text document
claude Oct 11, 2026
26fc4fb
feat(api): 🗃️ migration for article visibility and content id strategies
claude Oct 11, 2026
1ebbbde
test(content): 🔥 drop tests the AGENTS.md test rules rule out
claude Oct 11, 2026
98a6adf
fix(core): 🐛 type onReorder ids by the row's own id type
claude Oct 11, 2026
cf244dc
docs(content): 📝 document duplicate content, visibility and id strate…
claude Oct 11, 2026
11e05b6
feat(components): ✨ add HiddenIcon component for visibility control
aXenDeveloper Oct 11, 2026
84c0af0
refactor(content): ✏️ Remove unnecessary comments and improve code cl…
aXenDeveloper Oct 11, 2026
32406c4
feat(content): ✨ add visibility management and bulk actions for hidin…
aXenDeveloper Oct 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
CREATE TABLE "example_advanced_articles_tags" (
"itemId" integer,
"relatedItemId" uuid,
"position" integer NOT NULL,
"createdAt" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "example_advanced_articles_tags_pk" PRIMARY KEY("itemId","relatedItemId")
);
--> statement-breakpoint
ALTER TABLE "example_advanced_articles_tags" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
CREATE TABLE "example_events" (
"id" bigint PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (sequence name "example_events_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 9223372036854775807 START WITH 1 CACHE 1),
"createdAt" timestamp DEFAULT now() NOT NULL,
"updatedAt" timestamp DEFAULT now() NOT NULL,
"publishedAt" timestamp,
"status" varchar(32) DEFAULT 'draft' NOT NULL,
"version" integer DEFAULT 1 NOT NULL,
"hiddenAt" timestamp,
"hiddenBy" integer,
"primaryTag" uuid,
"category" integer
);
--> statement-breakpoint
ALTER TABLE "example_events" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
CREATE TABLE "example_events_gallery" (
"itemId" bigint,
"relatedItemId" integer,
"position" integer NOT NULL,
"createdAt" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "example_events_gallery_pk" PRIMARY KEY("itemId","relatedItemId")
);
--> statement-breakpoint
ALTER TABLE "example_events_gallery" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
CREATE TABLE "example_events_related_events" (
"itemId" bigint,
"relatedItemId" bigint,
"position" integer NOT NULL,
"createdAt" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "example_events_related_events_pk" PRIMARY KEY("itemId","relatedItemId")
);
--> statement-breakpoint
ALTER TABLE "example_events_related_events" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
CREATE TABLE "example_events_sessions" (
"id" serial PRIMARY KEY,
"itemId" bigint NOT NULL,
"position" integer NOT NULL,
"createdAt" timestamp DEFAULT now() NOT NULL,
"updatedAt" timestamp DEFAULT now() NOT NULL,
"title" varchar(200) NOT NULL,
"startsAt" timestamp
);
--> statement-breakpoint
ALTER TABLE "example_events_sessions" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
CREATE TABLE "example_events_tags" (
"itemId" bigint,
"relatedItemId" uuid,
"position" integer NOT NULL,
"createdAt" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "example_events_tags_pk" PRIMARY KEY("itemId","relatedItemId")
);
--> statement-breakpoint
ALTER TABLE "example_events_tags" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
CREATE TABLE "example_events_translations" (
"itemId" bigint,
"languageId" integer,
"version" integer DEFAULT 1 NOT NULL,
"createdAt" timestamp DEFAULT now() NOT NULL,
"updatedAt" timestamp DEFAULT now() NOT NULL,
"publishedAt" timestamp,
"status" varchar(32) DEFAULT 'draft' NOT NULL,
"title" varchar(200) NOT NULL,
"slug" varchar(160) NOT NULL,
"body" jsonb,
CONSTRAINT "example_events_translations_item_id_language_id_pk" PRIMARY KEY("itemId","languageId")
);
--> statement-breakpoint
ALTER TABLE "example_events_translations" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
CREATE TABLE "example_tags" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
"createdAt" timestamp DEFAULT now() NOT NULL,
"updatedAt" timestamp DEFAULT now() NOT NULL,
"publishedAt" timestamp,
"status" varchar(32) DEFAULT 'draft' NOT NULL,
"version" integer DEFAULT 1 NOT NULL,
"hiddenAt" timestamp,
"hiddenBy" integer,
"category" integer
);
--> statement-breakpoint
ALTER TABLE "example_tags" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
CREATE TABLE "example_tags_related_tags" (
"itemId" uuid,
"relatedItemId" uuid,
"position" integer NOT NULL,
"createdAt" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "example_tags_related_tags_pk" PRIMARY KEY("itemId","relatedItemId")
);
--> statement-breakpoint
ALTER TABLE "example_tags_related_tags" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
CREATE TABLE "example_tags_translations" (
"itemId" uuid,
"languageId" integer,
"version" integer DEFAULT 1 NOT NULL,
"createdAt" timestamp DEFAULT now() NOT NULL,
"updatedAt" timestamp DEFAULT now() NOT NULL,
"publishedAt" timestamp,
"status" varchar(32) DEFAULT 'draft' NOT NULL,
"name" varchar(100) NOT NULL,
"slug" varchar(160) NOT NULL,
CONSTRAINT "example_tags_translations_item_id_language_id_pk" PRIMARY KEY("itemId","languageId")
);
--> statement-breakpoint
ALTER TABLE "example_tags_translations" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
ALTER TABLE "blog_posts" ADD COLUMN "hiddenAt" timestamp;--> statement-breakpoint
ALTER TABLE "blog_posts" ADD COLUMN "hiddenBy" integer;--> statement-breakpoint
ALTER TABLE "core_ai_translation_sources" ALTER COLUMN "itemId" SET DATA TYPE varchar(64) USING "itemId"::varchar(64);--> statement-breakpoint
ALTER TABLE "core_content_documents" ALTER COLUMN "itemId" SET DATA TYPE varchar(64) USING "itemId"::varchar(64);--> statement-breakpoint
ALTER TABLE "core_content_drafts" ALTER COLUMN "itemId" SET DATA TYPE varchar(64) USING "itemId"::varchar(64);--> statement-breakpoint
ALTER TABLE "core_content_field_locks" ALTER COLUMN "itemId" SET DATA TYPE varchar(64) USING "itemId"::varchar(64);--> statement-breakpoint
ALTER TABLE "core_content_revisions" ALTER COLUMN "itemId" SET DATA TYPE varchar(64) USING "itemId"::varchar(64);--> statement-breakpoint
ALTER TABLE "core_content_schedules" ALTER COLUMN "itemId" SET DATA TYPE varchar(64) USING "itemId"::varchar(64);--> statement-breakpoint
ALTER TABLE "core_content_slug_history" ALTER COLUMN "itemId" SET DATA TYPE varchar(64) USING "itemId"::varchar(64);--> statement-breakpoint
ALTER TABLE "core_search_index" ALTER COLUMN "itemId" SET DATA TYPE varchar(64) USING "itemId"::varchar(64);--> statement-breakpoint
CREATE INDEX "blog_posts_hidden_by_idx" ON "blog_posts" ("hiddenBy");--> statement-breakpoint
CREATE UNIQUE INDEX "example_advanced_articles_tags_position_key" ON "example_advanced_articles_tags" ("itemId","position");--> statement-breakpoint
CREATE INDEX "example_advanced_articles_tags_related_item_id_idx" ON "example_advanced_articles_tags" ("relatedItemId");--> statement-breakpoint
CREATE INDEX "example_events_primary_tag_idx" ON "example_events" ("primaryTag");--> statement-breakpoint
CREATE INDEX "example_events_category_idx" ON "example_events" ("category");--> statement-breakpoint
CREATE INDEX "example_events_created_at_idx" ON "example_events" ("createdAt");--> statement-breakpoint
CREATE INDEX "example_events_updated_at_idx" ON "example_events" ("updatedAt");--> statement-breakpoint
CREATE INDEX "example_events_status_published_at_idx" ON "example_events" ("status","publishedAt");--> statement-breakpoint
CREATE INDEX "example_events_hidden_by_idx" ON "example_events" ("hiddenBy");--> statement-breakpoint
CREATE UNIQUE INDEX "example_events_gallery_position_key" ON "example_events_gallery" ("itemId","position");--> statement-breakpoint
CREATE INDEX "example_events_gallery_related_item_id_idx" ON "example_events_gallery" ("relatedItemId");--> statement-breakpoint
CREATE UNIQUE INDEX "example_events_related_events_position_key" ON "example_events_related_events" ("itemId","position");--> statement-breakpoint
CREATE INDEX "example_events_related_events_related_item_id_idx" ON "example_events_related_events" ("relatedItemId");--> statement-breakpoint
CREATE UNIQUE INDEX "example_events_sessions_position_key" ON "example_events_sessions" ("itemId","position");--> statement-breakpoint
CREATE UNIQUE INDEX "example_events_tags_position_key" ON "example_events_tags" ("itemId","position");--> statement-breakpoint
CREATE INDEX "example_events_tags_related_item_id_idx" ON "example_events_tags" ("relatedItemId");--> statement-breakpoint
CREATE INDEX "example_events_translations_language_id_status_idx" ON "example_events_translations" ("languageId","status");--> statement-breakpoint
CREATE UNIQUE INDEX "example_events_translations_language_id_slug_key" ON "example_events_translations" ("languageId","slug");--> statement-breakpoint
CREATE INDEX "example_tags_category_idx" ON "example_tags" ("category");--> statement-breakpoint
CREATE INDEX "example_tags_created_at_idx" ON "example_tags" ("createdAt");--> statement-breakpoint
CREATE INDEX "example_tags_updated_at_idx" ON "example_tags" ("updatedAt");--> statement-breakpoint
CREATE INDEX "example_tags_status_published_at_idx" ON "example_tags" ("status","publishedAt");--> statement-breakpoint
CREATE INDEX "example_tags_hidden_by_idx" ON "example_tags" ("hiddenBy");--> statement-breakpoint
CREATE UNIQUE INDEX "example_tags_related_tags_position_key" ON "example_tags_related_tags" ("itemId","position");--> statement-breakpoint
CREATE INDEX "example_tags_related_tags_related_item_id_idx" ON "example_tags_related_tags" ("relatedItemId");--> statement-breakpoint
CREATE INDEX "example_tags_translations_language_id_status_idx" ON "example_tags_translations" ("languageId","status");--> statement-breakpoint
CREATE UNIQUE INDEX "example_tags_translations_language_id_slug_key" ON "example_tags_translations" ("languageId","slug");--> statement-breakpoint
ALTER TABLE "blog_posts" ADD CONSTRAINT "blog_posts_hiddenBy_core_users_id_fkey" FOREIGN KEY ("hiddenBy") REFERENCES "core_users"("id") ON DELETE SET NULL ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_advanced_articles_tags" ADD CONSTRAINT "example_advanced_articles_tags_ATchHLRtvoCM_fkey" FOREIGN KEY ("itemId") REFERENCES "example_advanced_articles"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_advanced_articles_tags" ADD CONSTRAINT "example_advanced_articles_tags_dEsWdkDmu7nW_fkey" FOREIGN KEY ("relatedItemId") REFERENCES "example_tags"("id") ON DELETE RESTRICT ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events" ADD CONSTRAINT "example_events_hiddenBy_core_users_id_fkey" FOREIGN KEY ("hiddenBy") REFERENCES "core_users"("id") ON DELETE SET NULL ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events" ADD CONSTRAINT "example_events_primaryTag_example_tags_id_fkey" FOREIGN KEY ("primaryTag") REFERENCES "example_tags"("id") ON DELETE SET NULL ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events" ADD CONSTRAINT "example_events_category_example_categories_id_fkey" FOREIGN KEY ("category") REFERENCES "example_categories"("id") ON DELETE SET NULL ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events_gallery" ADD CONSTRAINT "example_events_gallery_itemId_example_events_id_fkey" FOREIGN KEY ("itemId") REFERENCES "example_events"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events_gallery" ADD CONSTRAINT "example_events_gallery_relatedItemId_core_files_id_fkey" FOREIGN KEY ("relatedItemId") REFERENCES "core_files"("id") ON DELETE RESTRICT ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events_related_events" ADD CONSTRAINT "example_events_related_events_itemId_example_events_id_fkey" FOREIGN KEY ("itemId") REFERENCES "example_events"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events_related_events" ADD CONSTRAINT "example_events_related_events_oaRvqnKyAS7L_fkey" FOREIGN KEY ("relatedItemId") REFERENCES "example_events"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events_sessions" ADD CONSTRAINT "example_events_sessions_itemId_example_events_id_fkey" FOREIGN KEY ("itemId") REFERENCES "example_events"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events_tags" ADD CONSTRAINT "example_events_tags_itemId_example_events_id_fkey" FOREIGN KEY ("itemId") REFERENCES "example_events"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events_tags" ADD CONSTRAINT "example_events_tags_relatedItemId_example_tags_id_fkey" FOREIGN KEY ("relatedItemId") REFERENCES "example_tags"("id") ON DELETE RESTRICT ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events_translations" ADD CONSTRAINT "example_events_translations_itemId_example_events_id_fkey" FOREIGN KEY ("itemId") REFERENCES "example_events"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_events_translations" ADD CONSTRAINT "example_events_translations_languageId_core_languages_id_fkey" FOREIGN KEY ("languageId") REFERENCES "core_languages"("id") ON DELETE RESTRICT ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_tags" ADD CONSTRAINT "example_tags_hiddenBy_core_users_id_fkey" FOREIGN KEY ("hiddenBy") REFERENCES "core_users"("id") ON DELETE SET NULL ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_tags" ADD CONSTRAINT "example_tags_category_example_categories_id_fkey" FOREIGN KEY ("category") REFERENCES "example_categories"("id") ON DELETE SET NULL ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_tags_related_tags" ADD CONSTRAINT "example_tags_related_tags_itemId_example_tags_id_fkey" FOREIGN KEY ("itemId") REFERENCES "example_tags"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_tags_related_tags" ADD CONSTRAINT "example_tags_related_tags_relatedItemId_example_tags_id_fkey" FOREIGN KEY ("relatedItemId") REFERENCES "example_tags"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_tags_translations" ADD CONSTRAINT "example_tags_translations_itemId_example_tags_id_fkey" FOREIGN KEY ("itemId") REFERENCES "example_tags"("id") ON DELETE CASCADE ON UPDATE CASCADE;--> statement-breakpoint
ALTER TABLE "example_tags_translations" ADD CONSTRAINT "example_tags_translations_languageId_core_languages_id_fkey" FOREIGN KEY ("languageId") REFERENCES "core_languages"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
Loading
Loading