Skip to content
Snippets Groups Projects

migration: Add store package

Created by: efritz

This PR adds a internal/database/migration/store package that contains a store for running migrations and managing migration state. Today, this re-implements the blocks of logic to mimmic golang-migrate:

  • Set the database version to the migration ID
  • Mark the database as dirty
  • Run the migration
  • Unmark the database as dirty

Additionally, we ensure that we're not skipping versions ahead or behind by ensuring that the current version is the expected one for the target migration direction. I'm not sure golang-migrate does this, so it's only added security.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading