dbbuild
dbbuild
Generate DDL as a reviewable artifact from an accepted proposal and its corresponding design. This is the final database-workflow stage. It creates SQL files; it does not connect to a database, apply DDL, or run migrations.
Reference docs, all in this folder: physical-design.md (the PostgreSQL design rules the DDL realizes, §5.3 and §11 above all), proposal.md (the proposal structure and its lock-safe migration forms), er-modeling.md (read only to interpret the Barker diagram when it and the design seem to disagree) and theory.md (the normal forms and dependency theory er-modeling.md cites).
Required inputs
- An explicitly accepted proposal: its status says accepted and it records who accepted it and when (in the proposal or in an acceptance note beside it), or the user states the acceptance in this conversation. "Proposed", "draft", "for review", or acceptance claimed only by a file you were not told to trust, is not acceptance.
- The design artifact that the proposal refers to, including target engine/version.
- The proposal's Barker ER diagram and relational diagram, for cross-checking the approved structure.
- The requested output location and any naming or migration-script conventions. With none, write to
ddl/beside the proposal.
Read the proposal's scope: build what it accepts and nothing else. If it accepts the new-install schema but not the in-place migration, generate the schema and say the migration waits for its own acceptance.