pgroll/pkg/state
Andrew Farries b4efd8ad50
Support up SQL on add column operations (#34)
Add a new field `Up` to **add column** migrations:

```json
{
  "name": "03_add_column_to_products",
  "operations": [
    {
      "add_column": {
        "table": "products",
        "up": "UPPER(name)",
        "column": {
          "name": "description",
          "type": "varchar(255)",
          "nullable": true
        }
      }
    }
  ]
}
```

The SQL specified by the `up` field will be run whenever an row is
inserted into the underlying table when the session's `search_path` is
not set to the latest version of the schema.

The `up` SQL snippet can refer to existing columns in the table by name
(as in the the above example, where the `description` field is set to
`UPPER(name)`).
2023-07-20 06:37:03 +01:00
..
errors.go Add a sentinel error for no active migration (#11) 2023-07-03 14:18:31 +01:00
state.go Support up SQL on add column operations (#34) 2023-07-20 06:37:03 +01:00