pgroll/pkg/state
Andrew Farries 4bee7acf06
Record index uniqueness in pgroll's internal schema representation (#247)
Add uniqueness information to each index recorded in `pgroll`'s internal
schema representation.

With the extra information, the entry for indexes in the schema
representation now looks like:

```json
"indexes": {                                                           
    "products_name_unique": {                                          
        "name": "products_name_unique",                                
        "unique": true,                                                                                                              
    },                                                                  
    "_pgroll_new_products_pkey": {                                     
        "name": "_pgroll_new_products_pkey",                           
        "unique": true,                                                                                                          
    }                                                                  
}
```

Having index uniqueness recorded in the schema representation will help
with preserving uniqueness constraints on columns duplicated for
backfilling (see https://github.com/xataio/pgroll/issues/227).
2024-01-22 15:04:54 +00:00
..
errors.go License check in github actions (#123) 2023-09-22 10:31:49 +00:00
state_test.go Record index uniqueness in pgroll's internal schema representation (#247) 2024-01-22 15:04:54 +00:00
state.go Record index uniqueness in pgroll's internal schema representation (#247) 2024-01-22 15:04:54 +00:00
status.go Move logic for the status command into the state and migrations packages (#205) 2023-11-22 12:36:54 +00:00