Skip to content

Stop mapping parameter_values.dynamic_id in API v1 before the column is dropped #4352

Done

Description

@anth-volk

Since revision 7f7335f0eb31 (#4347), a dynamic's values are dynamic_parameter_values rows, so no parameter_values row has a dynamic_id. API v1's ParameterValue still maps the column, and API v1 still names it:

  • every whole-row load of ParameterValue (/v2/parameter-values, its item route, GET /v2/policies/{id}) selects it;
  • the insert of a policy's values (POST /v2/policies and the dual-write v1-to-v2 policy copy) sets it to null;
  • the current-law reads, publication's comparison and uniqueness check, and pruning filter on dynamic_id IS NULL;
  • publication's insert of current-law values writes it.

#4351 drops the column. API v1's release workflow upgrades the schema before the new release takes traffic, so the release that serves during that upgrade must not name the column, or each of those statements fails until the new release is promoted.

Leave dynamic_id out of ParameterValue's mapper (exclude_properties), as was done for the report columns before revision 4e30076d4b9f, and stop naming it everywhere. The table keeps the column, its key, ck_parameter_values_single_owner and both partial indexes, so there is no revision. This must be in production before #4351 merges.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions