ALTER TABLE 'player'

Game development with Board Game Arena Studio
Post Reply
User avatar
Oermelie
Posts: 4
Joined: 22 July 2022, 07:00

ALTER TABLE 'player'

Post by Oermelie »

Hi everybody,

evertime I use the ALTER TABLE 'player' to add some custom fields to the table.

ALTER TABLE `player` ADD `beer` INT UNSIGNED NOT NULL DEFAULT '0';

my game doesnt start with some kind of error:

Unexpected error: Propagating error from gameserver 1 (method: createGame): BGA service error (reference: GS1 27/07 17:47:57) (reference: GS0 27/07 17:47:57)

After that the only way to start the game is to "Overwrite working copy with this revision"
User avatar
RicardoRix
Posts: 1688
Joined: 29 April 2012, 23:43

Re: ALTER TABLE 'player'

Post by RicardoRix »

I just added that line to my game, and it works fine.

file: dbmodel.sql

You can comment out a line with the double dash. You don't need to restore the last version.
So maybe there is something else you have broken.

Code: Select all

--ALTER TABLE `player` ADD `beer` INT UNSIGNED NOT NULL DEFAULT '0';
User avatar
Oermelie
Posts: 4
Joined: 22 July 2022, 07:00

Re: ALTER TABLE 'player'

Post by Oermelie »

my game is fully working until I comment out this line
User avatar
RicardoRix
Posts: 1688
Joined: 29 April 2012, 23:43

Re: ALTER TABLE 'player'

Post by RicardoRix »

start from a place where your code works and the game starts.

Then make changes. When it doesn't work anymore you've inadvertently broken something. The dbmodel.sql is only used when you start a new game and the DB is created.
User avatar
Tisaac
Posts: 1549
Joined: 26 August 2014, 21:28

Re: ALTER TABLE 'player'

Post by Tisaac »

Oermelie wrote: 28 July 2022, 08:30 my game is fully working until I comment out this line
You very likely just forgot to change the INSERT statement with that extra field.
Post Reply

Return to “Developers”