Page 1 of 1

No database on project creation.

Posted: 18 May 2020, 00:52
by ThomasC
So I'm trying to work through the Reversi Tutorial, and created 2 projects before I realized that a little patience was in order, and that I should wait a few minutes to see the new folders in my sftp area.

Now when I created the projects in the manage projects area, I did see a few errors in the results printout. Sadly, I didn't think to grab a screen capture.

But, eventually, the files eventually showed up, so I started working the tutorial. When I tried to launch my game though, I never got to the point where I could create a table. I tried another developer's copy, and it launched fine. I checked my database, and did not find anything there other than the information schema. I expected to find a database for each project. I concluded that the database creation process was aborted during the project setup.

So my question is, did I miss a step in the tutorial where I was supposed to do something in the database? Or is there some general setup for the database that I missed? Permissions or something?

Thanks for any insight.

_________
. | homas

Re: No database on project creation.

Posted: 18 May 2020, 10:29
by Lymon Flowers
ThomasC wrote: 18 May 2020, 00:52 So my question is, did I miss a step in the tutorial where I was supposed to do something in the database? Or is there some general setup for the database that I missed? Permissions or something?
Actually, there is one database for each game. So anytime you launch a game the schema (and other SQL statements) from dbmodel.sql is executed.

The setupNewGame() function from your game module (foo.game.php) is in charge of anything dynamic (like inserting player data into the player table).

Check that there is no error message in the browser console log or anywhere on the page, you may have syntax or programming errors preventing the full game initialization.

Re: No database on project creation.

Posted: 18 May 2020, 11:06
by Hornir91
Have you modified sftp.json in your IDE for server connection?

I had a problem with db when I clicked express start, to start a game, I couldn't get 'board' table initialized in db, but finally got it by modifying SQL statements in dbmodel.sql.

Re: No database on project creation.

Posted: 20 May 2020, 01:38
by ThomasC
Thanks for the replies, I appreciate any help I can get.

I guess I wasn't patient enough; When I came back today, the database had been created.

Thanks!