What would the migration look like to change the primary key on an existing table. My current table uses the standard id int. I need to user voter_uid and state_abbr.
CREATE TABLE public.voter_records (
first_name character varying NOT NULL,
last_name character varying NOT NULL,
middle_name character varying DEFAULT ''::character varying NOT NULL,
status character varying DEFAULT 'Active'::character varying NOT NULL,
precinct_id bigint NOT NULL,
id bigint NOT NULL,
email public.citext DEFAULT ''::public.citext NOT NULL,
state_abbr character varying NOT NULL,
voter_uid character varying NOT NULL,
address public.citext,
dob date,
party character varying,
phone character varying
);
What would the migration look like to change the primary key on an existing table. My current table uses the standard
id
int. I need to uservoter_uid
andstate_abbr
.