ALTER TABLE elon_tweets DROP CONSTRAINT elon_tweets_pkey; ALTER TABLE elon_tweets ADD COLUMN id uuid PRIMARY KEY DEFAULT gen_random_uuid(); CREATE UNIQUE INDEX index_elon_tweets_on_twitter_id ON elon_tweets (twitter_id); ALTER TABLE users DROP CONSTRAINT users_pkey; ALTER TABLE users ADD COLUMN id uuid PRIMARY KEY DEFAULT gen_random_uuid(); ALTER TABLE users ALTER COLUMN twitter_id TYPE CHARACTER VARYING(256); ALTER TABLE users ALTER COLUMN twitter_id SET NOT NULL; CREATE UNIQUE INDEX index_users_on_twitter_id ON users (twitter_id);