-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Labels
Testing & AnalysisTests & AnalyzersTests & AnalyzersdatabaseRelated to database accessRelated to database accessdevelopmentBugs, paper cuts, feature requests, or other thoughts on making omicron development betterBugs, paper cuts, feature requests, or other thoughts on making omicron development better
Description
While working on #4261, I found it hard to get confidence in my data migrations using existing tooling. One thing I found helpful was using DB Fiddle to write some similar tables and running similar migrations on them to make sure I got the expected results.
https://www.db-fiddle.com/f/pzmM69My6mZWq1NEKm56PG/1
However, this is lacking in ways that formal tooling could improve on:
- It's Postgres 15, not CRDB, and especially not the version of CRDB we're running
- The tables are simplified because making them match exactly is annoying to do by hand, even though it would be easy to do automatically
So what I have in mind is essentially a way of:
- Running migrations up to but not including the one under test
- Running some SQL to insert rows in the DB
- Running the migration under test
- Asserting stuff about the resulting DB state
just-be-dev
Metadata
Metadata
Assignees
Labels
Testing & AnalysisTests & AnalyzersTests & AnalyzersdatabaseRelated to database accessRelated to database accessdevelopmentBugs, paper cuts, feature requests, or other thoughts on making omicron development betterBugs, paper cuts, feature requests, or other thoughts on making omicron development better