Forums WoW Modding Support Archives Azerothcore Discord Archives [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

[DiscordArchive] Wouldn’t you have 1 query adding the new columns and then a series of UpDATE queries filling in the

rektbyfaith
Administrator
0
11-08-2024, 09:57 AM
#1
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?
rektbyfaith
11-08-2024, 09:57 AM #1

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?

rektbyfaith
Administrator
0
11-08-2024, 10:01 AM
#2
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
rektbyfaith
11-08-2024, 10:01 AM #2

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

rektbyfaith
Administrator
0
11-08-2024, 10:05 AM
#3
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
rektbyfaith
11-08-2024, 10:05 AM #3

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

rektbyfaith
Administrator
0
11-08-2024, 10:07 AM
#4
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
rektbyfaith
11-08-2024, 10:07 AM #4

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

rektbyfaith
Administrator
0
11-08-2024, 10:08 AM
#5
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
rektbyfaith
11-08-2024, 10:08 AM #5

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

rektbyfaith
Administrator
0
11-08-2024, 10:09 AM
#6
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
rektbyfaith
11-08-2024, 10:09 AM #6

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

rektbyfaith
Administrator
0
11-08-2024, 10:26 AM
#7
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>
rektbyfaith
11-08-2024, 10:26 AM #7

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>

rektbyfaith
Administrator
0
11-08-2024, 10:28 AM
#8
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
rektbyfaith
11-08-2024, 10:28 AM #8

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

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)