Skip to content

migration: Rough sketch of migration runner validation

Warren Gifford requested to merge ef/migration-validation-prework into main

Created by: efritz

Note: This PR is meant to be behavior-preserving, and all of the new code should not be hit in product paths (see the validateOnly=false argument values for all calls to connect).

This PR adds some additional logic to the internal/database/live/connect package. A new parameter will allow the connect function to either

  1. Check the schema version and return an error if it's behind (what we'll end up wanting for all app startup once we guarantee the migrator has run), or
  2. Check the schema version and attempt to migrate it if it's behind (what we'll use in development and/or the migrator).

Merge request reports

Loading