Skip to content

Instantly share code, notes, and snippets.

@antarr
Last active October 26, 2021 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antarr/f2141872d13027ff05794e6a4df6a0e2 to your computer and use it in GitHub Desktop.
Save antarr/f2141872d13027ff05794e6a4df6a0e2 to your computer and use it in GitHub Desktop.
Fix PrimayKey with existing Refrences
BEGIN;
-- Extend timeout for really large datasets
SET statement_timeout = 10000;
SET session_replication_role='replica';
UPDATE legiscan_model_states SET id=43 WHERE abbr='TX';
UPDATE voter_records SET state_id=43 WHERE state_id=54;
SET session_replication_role='original';
COMMIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment