11 lines
478 B
MySQL
11 lines
478 B
MySQL
|
-- requires an empty db
|
||
|
DROP INDEX index_users_on_twitter_id;
|
||
|
ALTER TABLE users ALTER COLUMN twitter_id DROP DEFAULT;
|
||
|
ALTER TABLE users ALTER COLUMN twitter_id TYPE bigint USING (twitter_id::bigint);
|
||
|
ALTER TABLE users DROP COLUMN id;
|
||
|
ALTER TABLE users ADD PRIMARY KEY (twitter_id);
|
||
|
DROP INDEX index_elon_tweets_on_twitter_id;
|
||
|
ALTER TABLE elon_tweets DROP CONSTRAINT elon_tweets_pkey;
|
||
|
ALTER TABLE elon_tweets DROP COLUMN id;
|
||
|
ALTER TABLE elon_tweets ADD PRIMARY KEY (twitter_id);
|