INSERT INTO zz_replay1 fail

Game development with Board Game Arena Studio
Post Reply
User avatar
Tsankur
Posts: 3
Joined: 29 November 2012, 23:10

INSERT INTO zz_replay1 fail

Post by Tsankur »

Hi everyone,

I have a problem with the zz_replay1 of my rings table when I switch state after my first player action.

I have this error.

Code: Select all

Unexpected error: Error while processing SQL request: INSERT INTO zz_replay1_rings (`id`,`angle`,`radius`,`outerRadius`) SELECT `id`,`angle`,`radius`,`outerRadius` FROM rings Field 'squareCount' doesn't have a default value
I don't understand why the 'squareCount' field is not copied with it.

Since I don't have acces to the code that call this I can't solve it myself.

When I have added the squareCount field I was not in a game.

Tried to change fields name to 'outer_radius' and 'square_count' the request stay the same (so the error is now on outerRadius).
Adding default value will not help.

How can I solve this?

Thanks.
User avatar
Quinarbre
Posts: 140
Joined: 15 December 2013, 23:26

Re: INSERT INTO zz_replay1 fail

Post by Quinarbre »

Is this field declared in your dbmodel file, or did you add it manually within the php code ?
And do all the values in your rings table actually have a squareCount value ?
User avatar
Tsankur
Posts: 3
Joined: 29 November 2012, 23:10

Re: INSERT INTO zz_replay1 fail

Post by Tsankur »

all is in the dbmodel.sql
and yes all rings have a squareCount.
The problem was solved with time (a night) but if each time I change the DB structure I have to wait the next day to continue my development It may takes ages to finish my game ^^ (I will try to think all my changes before doing all of them in one shot).
User avatar
Quinarbre
Posts: 140
Joined: 15 December 2013, 23:26

Re: INSERT INTO zz_replay1 fail

Post by Quinarbre »

I've never had to wait for the studio to take a db model change into account.

Are you sure this hasn't occurred in a game that was started (or created) before you modified dbmodel.sql ? Because what you're telling really points to that. Maybe you had modified the file locally but forgot to upload it before creating the game.
User avatar
Tsankur
Posts: 3
Joined: 29 November 2012, 23:10

Re: INSERT INTO zz_replay1 fail

Post by Tsankur »

Yes I'm sure that I have express stop my table before doing my changes to the dbmodel.sql file, and I'm sure that I have uploaded it because it work after the night without sending anything else.

edit : Maybe you don't have this problem because all your new column have default values (it's not my case).
Post Reply

Return to “Developers”