out-of-your-element/db/migrations/0003-distinguish-column-names.sql

20 lines
464 B
MySQL
Raw Normal View History

2023-10-04 23:32:05 +00:00
BEGIN TRANSACTION;
-- Rename mxc to mxc_url for consistency
ALTER TABLE lottie RENAME COLUMN mxc TO mxc_url;
-- Rename id to sticker_id so joins make sense in the future
ALTER TABLE lottie RENAME COLUMN id TO sticker_id;
-- Rename discord_id to user_id so joins make sense in the future
ALTER TABLE sim RENAME COLUMN discord_id TO user_id;
2023-10-05 23:31:10 +00:00
-- Rename id to emoji_id so joins make sense in the future
ALTER TABLE emoji RENAME COLUMN id TO emoji_id;
2023-10-04 23:32:05 +00:00
COMMIT;