upgradeTableDb

Game development with Board Game Arena Studio
Post Reply
User avatar
Lunalol
Posts: 584
Joined: 09 October 2016, 23:21

upgradeTableDb

Post by Lunalol »

Hi. Can upgradeTableDb could be used to just upgrade DB content, not DB structure ?

if ($from_version <= '2007040042')
{
self::applyDbUpgradeToAllDB("UPDATE DBPREFIX_markers SET location = 'weather_cold_0' WHERE location = 'cold_0'");
}

I just wanted to change the name of the location of some markers (''cold_0' is an ID of HTML element, it's new name is 'weather_cold_0')
My upgradeTableDb does nothing, why ?

Thansk for help.
(I'm on alpha phase)
User avatar
Een
Posts: 3861
Joined: 16 June 2010, 19:52

Re: upgradeTableDb

Post by Een »

Hi, it seems good to me and should work if you used the proper from_version. A procedure to test your upgradeTableDb on the studio has recently been added, so you can use that to check it out: http://en.doc.boardgamearena.com/Post-r ... ase_schema
User avatar
Lunalol
Posts: 584
Joined: 09 October 2016, 23:21

Re: upgradeTableDb

Post by Lunalol »

Hi again.

My production version is : Version 200704-0042 (Current PRODUCTION version)
So it should works but it no.

($from_version <= '2007040042' should we use a string or an integer, or perhaps it's the same ?)

DB update is not done, so I have a JS error because I want to place a marker on 'cold_0' element and it don't exist anymore (renamed 'weather_cold_0')

UPDATE : It's work for 2/3 table, I change to $from_version <= '9999999999' it works for all. So probably one table was already badly updated (DB update not commited but version number upgraded).
Post Reply

Return to “Developers”