mirror of
https://github.com/xataio/pgroll.git
synced 2024-09-17 16:57:30 +03:00
b4efd8ad50
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)`). |
||
---|---|---|
.. | ||
01_create_tables.json | ||
02_create_another_table.json | ||
03_add_column.json | ||
04_rename_table.json |