GemeenteNijmegen / webformulieren-submissionstorage

Storage of submitted forms
European Union Public License 1.2
0 stars 0 forks source link

feat: Migration for dynamodb users (kvk) #314

Closed joostvanderborg closed 2 weeks ago

joostvanderborg commented 2 weeks ago

KVK-numbers were not being saved correctly, since they're stored in S3 as 'kvknummer' and not 'kvk'. This migration runs through all submissions and retrieves the userid and type, and creates a new record with a primary key starting with 'PERSON', 'ORG', or 'ANONYMOUS'.

The old records are maintained, but we add the attribute 'migrated20241106' to show they have been migrated. The new items get the same attribute. This way only non-migrated records will be added in runs of this migration.

After succesful migration, a cleanup task should be added for old records. These can be distinguished by a PK starting with 'USER#' instead of 'PERSON', 'ORG', or 'ANONYMOUS'.