Schreibe V1__initial_schema.sql Flyway-Migration (8 Entities) #5

Open
opened 2026-04-06 11:56:41 +02:00 by pplate · 0 comments
Owner

Ziel

Flyway-Migration für alle 8 JPA-Entities anlegen:

Entity Tabelle Besonderheit
Club clubs tenant root
Member members age_category ENUM
Strain strains batch_number
Stock stock_items quantity_grams
Distribution distributions updatable=false (immutable!)
ComplianceReport compliance_reports export_format
PreventionOfficer prevention_officers designation_date
RecallEvent recall_events batch_ref FK

Akzeptanzkriterien

  • Flyway Migration läuft idempotent durch
  • Distribution-Records haben DB-Level Immutability-Trigger
  • tenant_id NOT NULL Constraint auf allen Tabellen
  • PostgreSQL CHECK Constraints für Mengen-Limits

Referenz

Architecture Doc

## Ziel Flyway-Migration für alle 8 JPA-Entities anlegen: | Entity | Tabelle | Besonderheit | |--------|---------|--------------| | Club | clubs | tenant root | | Member | members | age_category ENUM | | Strain | strains | batch_number | | Stock | stock_items | quantity_grams | | Distribution | distributions | `updatable=false` (immutable!) | | ComplianceReport | compliance_reports | export_format | | PreventionOfficer | prevention_officers | designation_date | | RecallEvent | recall_events | batch_ref FK | ## Akzeptanzkriterien - [ ] Flyway Migration läuft idempotent durch - [ ] Distribution-Records haben DB-Level Immutability-Trigger - [ ] `tenant_id` NOT NULL Constraint auf allen Tabellen - [ ] PostgreSQL CHECK Constraints für Mengen-Limits ## Referenz [Architecture Doc](http://truenas.local:30008/pplate/pi_mcps/wiki/CannaManage-03-Architecture)
pplate added this to the Phase 0 — Foundation (Wochen 1–8) milestone 2026-04-06 11:56:41 +02:00
pplate added the cannamanagefeat labels 2026-04-06 11:56:41 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: pplate/pi_mcps#5