CI: skip copying own models to avoid duplicate SQLAlchemy table defs
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m52s

Each app has its own models/ at the root (imported as bare `models.X`).
The CI copy was also creating {app}/models/ (imported as `{app}.models.X`),
causing SQLAlchemy to see the same table defined twice.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-11 16:14:46 +00:00
parent 73160377f1
commit 9d13230465

View File

@@ -39,8 +39,9 @@ jobs:
git fetch origin ${{ github.ref_name }}
git reset --hard origin/${{ github.ref_name }}
git submodule update --init --recursive
# Copy sibling app models for cross-domain imports (read from git objects to avoid race conditions)
# Copy sibling app models for cross-domain imports (skip self to avoid duplicate table defs)
for sibling in blog market cart events; do
[ \"\$sibling\" = \"${{ env.IMAGE }}\" ] && continue
rm -rf \$sibling/__init__.py \$sibling/models
repo=/root/rose-ash/\$sibling
if [ -d \$repo/.git ]; then