Alter SQL column names to be distinct
This commit is contained in:
parent
a49b46381c
commit
28abdac5b6
14 changed files with 40 additions and 25 deletions
15
db/migrations/0003-distinguish-column-names.sql
Normal file
15
db/migrations/0003-distinguish-column-names.sql
Normal file
|
@ -0,0 +1,15 @@
|
|||
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;
|
||||
|
||||
COMMIT;
|
Loading…
Add table
Add a link
Reference in a new issue