21 Commits

Author SHA1 Message Date
Matthieu
208d49aac8 fix: use DELETE instead of TRUNCATE for migration
Use DELETE instead of TRUNCATE to avoid requiring table ownership.
Wrap in DO block for better error handling and logging.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 11:51:57 +01:00
Matthieu
ff278f5549 fix: correct Product-Constructeur join table orientation
The _ProductConstructeurs table was created with wrong column order:
- Before: A=product, B=constructeur
- After: A=constructeur, B=product (alphabetical order expected by Prisma)

This caused Prisma to fail loading constructeurs relations, resulting in empty constructeurs arrays in API responses.

Changes:
- Added migration to swap A/B columns and recreate foreign keys
- Added debug logs in products.service.ts and constructeur-link.util.ts

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 11:48:06 +01:00
Matthieu
6cf2b566ce feat: add product domain and machine integration
- extend Prisma schema with products, product constructs and link tables\n- introduce product service, DTOs and includes with constructeur support\n- integrate product selections across model type skeletons, composants, pièces and machines\n- validate product requirements when building machine skeletons and payloads
2025-11-05 15:34:42 +01:00
Matthieu
e81f71e3e7 fix: prune orphan constructeur links before orientation swap 2025-10-30 12:01:49 +01:00
Matthieu
fe471b9e81 fix: normalize constructeur join tables orientation 2025-10-30 11:32:11 +01:00
Matthieu
9f522a6dbb feat: gérer l'ordre des champs personnalisés 2025-10-28 18:08:08 +01:00
Matthieu
635ea0e84e fix: corrige les associations constructeurs 2025-10-28 16:37:06 +01:00
Matthieu
16a703a4c3 feat: persist type requirement order 2025-10-23 09:36:39 +02:00
Matthieu
582a6fd7e1 feat(backend): enforce unique names and surface duplicate errors 2025-10-13 17:03:36 +02:00
Matthieu
dc4a12440b feat: auto populate machine structures and seed sample data 2025-10-13 09:01:33 +02:00
MatthieuTD
b7682ac312 Expand machine hydration unit coverage 2025-10-09 09:34:50 +02:00
MatthieuTD
c23ba3a587 Migrate away from legacy component and piece models 2025-10-02 15:44:02 +02:00
Matthieu
2ce164784f FIx: delete champs par default 2025-09-25 11:26:22 +02:00
Matthieu
e64fba3ae7 feat: Add Model gestion for piece and component 2025-09-23 15:05:33 +02:00
Matthieu
b6ca9ae54b feat: Add feature in component and piece for support group 2025-09-22 08:35:36 +02:00
Matthieu
df5bbeecb7 feat: add profiles session API 2025-09-17 23:11:25 +02:00
Matthieu
83251b532c feat(constructeurs): introduce constructors management 2025-09-17 15:09:54 +02:00
Matthieu
339f46ec24 feat(site): add document support 2025-09-17 11:40:34 +02:00
Matthieu
7671d4729d feat(site): add contact fields 2025-09-17 11:13:19 +02:00
Matthieu
e8aeaf98e9 refactor: rename prestataire to constructeur 2025-09-17 08:50:07 +02:00
Matthieu
dbc89327eb feat: Configuration de la base de données avec Prisma - Ajout du schéma de base de données et des migrations initiales 2025-07-29 21:03:16 +02:00