Add glue layer support: MenuNode templates, factory registration, migration

- Templates: item.post.X → item.X (MenuNode has label/slug/feature_image directly)
- factory.py: add glue.models to import loop + register_glue_handlers() at startup
- alembic env.py: add glue.models to import loop
- New migration: container_relations + menu_nodes tables with backfill from existing data

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-11 23:37:35 +00:00
parent e1e6a7a98b
commit 2c4ab9e3c8
7 changed files with 129 additions and 26 deletions

View File

@@ -19,7 +19,7 @@ from shared.db.base import Base
# Import ALL models so Base.metadata sees every table
import shared.models # noqa: F401 User, KV, MagicLink, MenuItem, Ghost*
for _mod in ("blog.models", "market.models", "cart.models", "events.models"):
for _mod in ("blog.models", "market.models", "cart.models", "events.models", "glue.models"):
try:
__import__(_mod)
except ImportError: