Articles tagged with migrations

  1. Faster migration tests

    Published:

    Almost invariably when I start to work at a new company, I look at the project configuration and find something like this:

    [tool.coverage.run]
    branch = true
    omit = ["**/migrations/*"]
    
    [tool.ruff]
    exclude = ["**/migrations/*"]
    

    My suspicion about how prevalent this is is confirmed by GitHub Copilot suggesting it to me the …

  2. Testing Django data migrations

    Published: | Updated:

    You probably already know the value of testing your code. Your Django migrations are code, therefore you should test them. However, testing data migrations in particular can be tricky, and there's no documentation on how to do it.

    Typically your schema migrations don't need any testing as your migrations are …