Update docs to reflect per-table DDL scripts and schema.dbml from #251 (#252)

This commit is contained in:
2026-08-27 01:02:58 -04:00
committed by GitHub
parent fcee0f9213
commit 92a30b11db
2 changed files with 20 additions and 10 deletions

View File

@@ -476,12 +476,16 @@ For the table-by-table schema and the custom SQL error code scheme, see
```
scripts/
└── 01-schema/
└── schema.sql # full table/index/constraint definitions
├── 01-UserAccount.sql
├── 02-Photo.sql
├── ...
└── 16-BeerPostComment.sql # one script per CREATE TABLE
```
Currently the whole schema is a single versioned script. As the schema evolves,
new numbered scripts get added alongside it rather than editing `schema.sql` in
place, so DbUp's already-applied tracking stays valid.
Each table has its own script, numbered so a table's foreign keys always point
at an earlier-numbered script. As the schema evolves, new numbered scripts get
added rather than editing an existing one in place, so DbUp's already-applied
tracking stays valid.
### Data seeding