[DiscordArchive] Wouldn’t you have 1 query adding the new columns and then a series of UpDATE queries filling in the
[DiscordArchive] Wouldn’t you have 1 query adding the new columns and then a series of UpDATE queries filling in the
Archived author: sudlud • Posted: 2024-11-08T09:57:40.277000+00:00
Original source
Wouldn’t you have 1 query adding the new columns and then a series of UpDATE queries filling in the new columns?
Archived author: sudlud • Posted: 2024-11-08T10:01:16.855000+00:00
Original source
The command adding the columns is not repeatable in this case, which should probably be alright for this kind of update
Archived author: Ryan Turner • Posted: 2024-11-08T10:05:50.259000+00:00
Original source
Let me see if i can explain better at least from what i was screwing around and looking up online. (yesterday)
MySQL doesn't support ALTER TABLE with DROP IF EXISTS column x, y(i tried many sytnaxes even having every forum post saying mysql doesnt have.
So i ended up just making a query to add the columns and to add the new text data. And than exported the Table with the new structure and new data
Archived author: Ryan Turner • Posted: 2024-11-08T10:07:53.657000+00:00
Original source
Because my reason to wanting to drop if column existed was to avoid an errors if it existsed. Than created it. And not much control how to give conditions to it i ended up just doing the said above
Archived author: Ryan Turner • Posted: 2024-11-08T10:08:45.526000+00:00
Original source
I dont have it anymore with the modify. But at this point was when i change everything and figured out the above
factiontest.sql
Archived author: Ryan Turner • Posted: 2024-11-08T10:09:52.599000+00:00
Original source
Even the delet from where X in i and a AND there before to see if i could have both together, it always missed the first value for some reson so i made them seperate
Archived author: sudlud • Posted: 2024-11-08T10:26:52.955000+00:00
Original source
Yeah it would just be a plain adding of the new columns without any conditions / checks if it exists etc. And then the list with updates. But probably another opinion on this would be helpful, maybe <@251803844307189761>
Archived author: Ryan Turner • Posted: 2024-11-08T10:28:03.049000+00:00
Original source
I will leave my PR here so he can look at it and give his feedback then: https://github.com/azerothcore/azerothco...0480/files