Files
yourpart3/backend/migrations
Torsten Schulz (local) 70c381114b
Some checks failed
Deploy to production / deploy (push) Failing after 3m14s
feat(migration): enhance contact_message migration to check for existing columns before adding/removing
- Updated the migration script for the contact_message table to conditionally add or remove columns based on their existence, improving migration safety and preventing errors during deployment.
- This change ensures that the migration can be run multiple times without causing issues if the columns already exist or are missing.
[force-deploy]
2026-04-17 12:01:25 +02:00
..
2024-07-28 16:12:48 +02:00

Backend-Migrationen (Sequelize)

Migrationen in diesem Ordner werden mit dem Sequelize-CLI ausgeführt (Konfiguration siehe Projekt-Root / backend).

Falukant: Zertifikat und Produktionszählung

Datei Inhalt
20260402140000-add-certificate-productions-count-since.cjs Spalte falukant_data.falukant_user.certificate_productions_count_since (TIMESTAMPTZ, nullable) inkl. Kommentar. Setzt die DB-Grundlage dafür, dass Daemon, Backend und UI dieselbe Periode für „abgeschlossene Produktionen“ nutzen (Filter mit COALESCE(production_timestamp, production_date::timestamp) ab diesem Zeitpunkt; NULL = bisherige Historie).

Eine parallele SQL-Migration im Daemon-Repository (z.B. 014_falukant_certificate_productions_count_since.sql) kann dieselbe Spalte anlegen, wenn das Deployment dort getrennt ist Schema doppelt anlegen vermeiden.

Details zur Zähl- und Retention-Logik: docs/FALUKANT_PRODUCTION_CERTIFICATE.md.