Skip to content

Drop parameter_values.dynamic_id, its single-owner check and its per-dynamic index #4350

Done

Description

@anth-volk

Since revision 7f7335f0eb31 (#4347), a dynamic's values are dynamic_parameter_values rows, so no parameter_values row names a dynamic. parameter_values still has:

  • dynamic_id, with its key to dynamics;
  • ck_parameter_values_single_owner, the check that a row names a policy or a dynamic, never both;
  • uq_parameter_values_dynamic_parameter_start_date, a partial unique index of one value per dynamic, parameter and start date;

and API v1's current-law reads, publication and pruning still filter on dynamic_id IS NULL.

Drop them in an autogenerated v2 revision whose downgrade restores them, so that 7f7335f0eb31's downgrade can still copy dynamics' values back. parameter_values then holds only policies' values and current-law values.

It merges only once no running release maps the column: API v1's (#4347 stops mapping it) and the simulation service's (PolicyEngine/policyengine-sim-api#1129).

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