Skip to main content

Julia Evans

dbmate for SQL migrations with SQLite

I’ve been making a web application where I haven’t ironed out my database schema yet so I wanted a migration tool to tweak it as I change my mind.

Someone on Mastodon recommended dbmate recently and it’s been working well. Here’s how I use it:

  1. Run dbmate new my_migration
  2. Edit the migration file to
  3. Run dbmate up to apply it

Then I can run dbmate up in production too. I’ve only been doing “up” migrations, no “down” migrations.