Store percentages as floats
I have one Artifact quality level item I want to be sold. If I set percentage to the minimum possible value (1%) that means the AH bot wants to sell 90 of these items, and sells tons of this supposed to be rare item.
With percentages as float it can be set to 0.1%. I also made it round up so a 0.1% doesn't end up with zero..
I don't know if the naming of the DB update file is correct. it does work like that, but would you prefer some date prefix? which date?
https://github.com/azerothcore/mod-ah-bot/actions/runs/9036393402/job/24833180952#step:10:564 I don't understand that, I would expect that the base SQL script is already applied before the update scripts run
@pangolp any idea?
@pangolp any idea?
Tomorrow as soon as I turn on the PC it fixed the error. I hadn't seen the notification.
https://github.com/azerothcore/mod-ah-bot/actions/runs/9036393402/job/24833180952#step:10:564 I don't understand that, I would expect that the base SQL script is already applied before the update scripts run
It should work as you say, but it seems to me that it doesn't work that way unfortunately. It has happened to me with other modules and I have had the same results. When the SQL is edited, however, the hash changes and the script runs again. So you can edit the original script or, failing that, not use the updates folder. There must be an error, in the order in which the SQLs are executed. It should be base first, then updates. But I always fail that. And it is something that the truth is, I never investigated why it happened.
For this to pass the tests, and to be able to merge, it is best to create the SQL within the base, so that it is executed after the first one. For some reason that I don't know, the modules have this problem, that they first execute the updates. The same thing has happened to me in several modules. But it must be something about the emulator (regarding the modules). First you should run all the bases, and then the updates. But here, that does not happen, and that is why this error is caused.
I tried that at first. The server sees that the hash has changed, and runs the whole base SQL. Which means your config table with the percentages gets overwritten with the defaults. I don't want to add a feature that deletes all your configuration..
@Helias What was the error with this pull request? Because I was checking the log and I didn't see anything, due to the time since it was executed. Could you run it again, to find out what the error is? Thanks.
I've restarted the build with the updated pipeline
@dedmen please update your fork with latest version and make the PR with master not with rework-1
Thank you, I will probably need a week or two to get to it 🫡