fix(n8n): resolve duplicate key constraint on tag_entity during workflow import
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
Run Tests on Branches / Parapharmacy API Tests (push) Has been skipped
Run Tests on Branches / PIP Platform Tests (push) Has been skipped
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
Run Tests on Branches / Parapharmacy API Tests (push) Has been skipped
Run Tests on Branches / PIP Platform Tests (push) Has been skipped
n8n import:workflow --separate imports each JSON file independently. All 4 workflows shared the same tags (parapharmacy, scraper), so the second import tried to INSERT duplicate tag names, hitting the unique index on tag_entity.name. - Remove tags field from all 4 workflow JSON files (cosmetic, re-add via UI) - Add cleanup-db.js to wipe workflow data before import - Add --overwrite flag to import command as safety net - Add cleanup-db.js volume mount to n8n-init container
This commit is contained in:
+3
-2
@@ -163,8 +163,6 @@ services:
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
n8n-init:
|
||||
condition: service_completed_successfully
|
||||
|
||||
# --- N8N Init: import + activate workflows BEFORE n8n starts, then seed DB ---
|
||||
n8n-init:
|
||||
@@ -182,12 +180,15 @@ services:
|
||||
- n8n_data:/home/node/.n8n
|
||||
- ./n8n/workflows:/home/node/workflows
|
||||
- ./n8n/init-import.sh:/home/node/init-import.sh:ro
|
||||
- ./n8n/cleanup-db.js:/home/node/cleanup-db.js:ro
|
||||
- ./n8n/seed.json:/home/node/seed.json:ro
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
parapharmacy-api:
|
||||
condition: service_healthy
|
||||
n8n:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
backend_data:
|
||||
|
||||
Reference in New Issue
Block a user