Page 1 of 1
ALTER TABLE 'player'
Posted: 27 July 2022, 16:52
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"
Re: ALTER TABLE 'player'
Posted: 27 July 2022, 18:43
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';
Re: ALTER TABLE 'player'
Posted: 28 July 2022, 08:30
by Oermelie
my game is fully working until I comment out this line
Re: ALTER TABLE 'player'
Posted: 28 July 2022, 09:58
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.
Re: ALTER TABLE 'player'
Posted: 30 July 2022, 17:13
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.
Re: ALTER TABLE 'player'
Posted: 21 November 2023, 11:51
by toddcarson
Afterwards, make the necessary edits. You broke it by accident the last time it stopped working. The dbmodel.sql file is used when you start a new game and create the database.
geometry dash
Re: ALTER TABLE 'player'
Posted: 25 November 2023, 05:18
by snugglecactus
Tisaac wrote: ↑30 July 2022, 17:13
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.
Shouldn't be a problem with the `DEFAULT` clause there.