Page 1 of 1

"Synchronise with DB Server information" on AppServer ?

PostPosted: Thu Mar 23, 2017 1:09 pm
by Bernd.N
I imported a new solution version into a smart client test application server.
After that I realized that this test server has old data, so I deleted the database, created a new one and imported the current database from the life server.
Then I imported the latest solution version again, and I assumed that Servoy checks again on import all tables against the Servoy repository and makes necessary changes to the tables.

However I miss now at least one table called eim_events on the test application server.
I imported the new solution again, explicitly checking if the option "Allow data model (database) changes" was checked.
Still no table eim_events.

1) Can I force to run something like "Synchronise with DB Server information" on this Test-AppServer ?
2) Could it be a problem that I work with Servoy 7.4.8 on my developer site and the test server has Servoy 7.4.5 ?
3) What could have caused this problem in general?

Needless to say that when database synchronisation is not working properly, I have a big problem.

BTW, I checked the repository on the AppServer with "SELECT DISTINCT tablename FROM servoy_columninfo ORDER BY tablename", and there also the table "eim_events" is missing.

Re: "Synchronise with DB Server information" on AppServer ?

PostPosted: Thu Mar 23, 2017 1:49 pm
by patrick
I understand you have added that table in developer and want to "deploy" it now?

Does any*thing* (a form, relation, valuelist, ...) reference this table? If not, it might not be included. You can also have a look inside the .servoy file (that's just a zip). There should be xml file with the database info.

Re: "Synchronise with DB Server information" on AppServer ?

PostPosted: Thu Mar 23, 2017 2:00 pm
by Andrei Costescu
Yes, check "export\database_info.xml" inside the .servoy file to see if it is there.

If it is not there then it's either because of what Patrick said (not referenced by the solution and you didn't check export all tables from referenced servers (provided the solution uses other tables from the same server)) or you did a .dbi based export and you don't have a .dbi file for that table.

Re: "Synchronise with DB Server information" on AppServer ?

PostPosted: Thu Mar 23, 2017 2:02 pm
by Bernd.N
Yes, right, I want to deploy it.

Yes, code references to it, but only one single line.
So this might be not enough. I will create a form with the table in next version:

eim_events.png
eim_events.png (24.63 KiB) Viewed 5025 times

Thanks for the tip regarding unzipping the .servoy file, very interesting how that looks and what to find there:

export.png
Unzipped .servoy File
export.png (5.78 KiB) Viewed 5025 times

And you are right, it was not included in the database_info.xml inside the .servoy file.

Re: "Synchronise with DB Server information" on AppServer ?

PostPosted: Thu Mar 23, 2017 2:05 pm
by Bernd.N
Andrei Costescu wrote:... you didn't check export all tables from referenced servers

That is correct, Andrei, I never did this so far. Will check this soon...

Re: "Synchronise with DB Server information" on AppServer ?

PostPosted: Thu Mar 23, 2017 2:33 pm
by patrick
References of a table in code are not discovered. Only "hard" references in relations, value lists, forms and I guess anything table related like calculations. And then you can either export all tables "used" by the solution (hard references) or all tables.

Re: "Synchronise with DB Server information" on AppServer ?

PostPosted: Fri Mar 24, 2017 7:53 am
by Bernd.N
After creating a form for the table, the table was exported too.
I decided against exporting all tables, as I see now the value that not needed tables are not exported.
Thank you both for the quick help!