Search Results
7/23/2025, 7:14:47 AM
>>102574379
No that's cringe and sad if you spend your time doing that.
It's a super cool sql migration that coverts the columns containing emote data on my message table into a join table.
See, I did some stupid shit when I was creating the schema for my database, and instead of doing this, I chose a JSON column that contained ids of emotes. This was just a result of my naivety in proper database structure.
However, I've now learned. So I'm writing this migration that (in MySql code) will parse the JSON of the columns storing this emote data and convert it into this new table.
There's some more to it, like for some reason I separated third party emotes from twitch emotes. I've joined those and added some things in place to differentiate between them on the emote table.
That part just makes the migration even more complicated because it makes me have to run a similar migration for both columns, and it's stored stupid. I had the genius idea to store the third party emotes as their string names. Not very ORM of me, I know (iykyk).
But it all seems to be working now! I'll have to run it after stream tomorrow, because testing it on the full database it took like 50 minutes to run on my computer.... Across 1,250,000 messages... But the size of the database dropped by like 20MB which is cool.
Anyways here's a Shondo. (It's a screenshot from that time she banned me as a joke)
No that's cringe and sad if you spend your time doing that.
It's a super cool sql migration that coverts the columns containing emote data on my message table into a join table.
See, I did some stupid shit when I was creating the schema for my database, and instead of doing this, I chose a JSON column that contained ids of emotes. This was just a result of my naivety in proper database structure.
However, I've now learned. So I'm writing this migration that (in MySql code) will parse the JSON of the columns storing this emote data and convert it into this new table.
There's some more to it, like for some reason I separated third party emotes from twitch emotes. I've joined those and added some things in place to differentiate between them on the emote table.
That part just makes the migration even more complicated because it makes me have to run a similar migration for both columns, and it's stored stupid. I had the genius idea to store the third party emotes as their string names. Not very ORM of me, I know (iykyk).
But it all seems to be working now! I'll have to run it after stream tomorrow, because testing it on the full database it took like 50 minutes to run on my computer.... Across 1,250,000 messages... But the size of the database dropped by like 20MB which is cool.
Anyways here's a Shondo. (It's a screenshot from that time she banned me as a joke)
Page 1