Skip to content

Update DB Table Iterators to Max ID #197

@rhodges

Description

@rhodges

Users are seeing "500" errors when trying to create new records.

This appears to be the result of unique field value collisions: the data that was imported during installation (lookups, et al.) came with IDs, but did NOT update PostgreSQL's iterator values, so new records are attempting to save using IDs that already exist in the DB.

While in some cases trying over-and-over again would eventually get the iterator where it needs to be, some partners have hundreds or thousands of records.

A similar issue was hit in the Madrona Portal project when migrating Layer and Theme models from Data Manager to the Layers Module. We can reuse this strategy to detect the error during save, update the iterator to reflect the highest existing ID, and then carry on. However, this will likely need to be reproduced for over a dozen models, and therefore requires careful testing.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions