xataio / pgroll

PostgreSQL zero-downtime migrations made easy
https://www.xata.io
Apache License 2.0
3.56k stars 67 forks source link

Errors during backfill don't cause a rollback #316

Closed andrew-farries closed 7 months ago

andrew-farries commented 7 months ago

To reproduce:

{
  "name": "01_create_table",
  "operations": [
    {
      "create_table": {
        "name": "users",
        "columns": [
          {
            "name": "id",
            "type": "serial",
            "pk": true
          },
          {
            "name": "name",
            "type": "varchar(255)",
            "unique": true
          }
        ]
      }
    }
  ]
}
{
  "name": "02_change_type",
  "operations": [
    {
      "alter_column": {
        "up": "invalid",
        "down": "invalid",
        "type": "text",
        "table": "users",
        "column": "name"
      }
    }
  ]
}

Expected behaviour:

Actual behaviour: