Skip to content

chore(db): automate master.xml append in db:draft-changelog script #1297

Description

@FelixTJDietrich

Context: #1290 (epic #1097 server foundations) deliberately retained master.xml with explicit <include> per changelog rather than switching to <includeAll/>. Rationale in ADR 0006: two parallel migration PRs produce a natural merge conflict in master.xml that forces authors to agree on order; <includeAll/> would silently interleave them lexicographically.

The trade-off is a manual step: drafting a new changelog today requires both running the db:draft-changelog script AND remembering to append the new file to master.xml. Easy to forget.

What needs to ship

Update db:draft-changelog (the script that generates a new timestamped changeset under server/src/main/resources/db/changelog/) so that it also appends an <include file="changelog/<timestamp>_changelog.xml" relativeToChangelogFile="true"/> line to master.xml immediately before the closing </databaseChangeLog>.

The two-PR ordering conflict surface is preserved (parallel PRs still conflict on the new line; authors still have to resolve it deliberately). The forget-to-edit-master footgun goes away.

Acceptance

  • db:draft-changelog updates master.xml automatically
  • docs/contributor/database-migration.mdx updated to remove the manual append step
  • Test that running the script twice in quick succession produces two correctly-ordered <include> lines
  • CI gate: a changelog file exists under db/changelog/ without a corresponding <include> in master.xml fails the build

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    application-serverSpring Boot server: APIs, business logic, databaseenhancementImprovement to existing functionality

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions