mirror of
https://github.com/xataio/pgroll.git
synced 2024-09-11 05:45:48 +03:00
Add information about indexes on a table to `pg-roll`'s internal state storage. For each table, store an additional JSON object mapping each index name on the table to details of the index (initially just its name). An example of the resulting JSON is: ```json { "tables": { "fruits": { "oid": "16497", "name": "fruits", "columns": { "id": { "name": "id", "type": "integer", "comment": null, "default": "nextval('_pgroll_new_fruits_id_seq'::regclass)", "nullable": false }, "name": { "name": "name", "type": "varchar(255)", "comment": null, "default": null, "nullable": false } }, "comment": null, "indexes": { "_pgroll_idx_fruits_name": { "name": "_pgroll_idx_fruits_name" }, "_pgroll_new_fruits_pkey": { "name": "_pgroll_new_fruits_pkey" }, "_pgroll_new_fruits_name_key": { "name": "_pgroll_new_fruits_name_key" } } } } } ``` Also add fields to the `Schema` model structs to allow the new `indexes` field to be unmarshalled. |
||
---|---|---|
.. | ||
errors.go | ||
state.go |