DB column modification causes import issue

Hello,

Have an issue when importing new version of the solution, I check following options on {servoy_server}/servoy-admin/solutions/import:
Override existing sequence type definitions (in repository) with the sequence types contained in the import file.
Allow data model (database) changes
Display data model (database) changes
Import internationalization (i18n) data

Anyway I get warning:
The server version of the column ‘x’ of table ‘y’ in server ‘z’ has pk constraint while in the import version it has constraint

Solution doesn’t work as it still uses the ‘server version’'?! Tried to restart the application_server (couple of times) already.
How to update the existing DB on the server to match the real MySQL DB model (maintained by MySQL Administrator) and allow correct import of the solution?

Regards

Hi Imre,

Are you sure that is the whole error message ? It seems garbled/cut off.
You say you maintain the schema outside of Servoy (which is not an issue). Is this (updated) schema exactly the same as your development environment ?
It seems Servoy is complaining about that it sees a PK constraint on a column while it isn’t there in the solution you want to import.

Perhaps you can export your solution again from Developer (if you make schema changes outside Developer you also need to restart Developer to make it see the schema changes just like Server) and try importing it again.

Hope this helps.

Thank you for your fast response Robert,

Changes:
-have a table y that had 2 columns as PK, 1 of them was x;
-removed the PK feature for x column outside Servoy (MySQL Administrator), so only the other column remains as PK; Did the Synchronize with DB server information and Quick Fixed the difference so that Developer sees only 1 column as PK and works with that table as expected;
Exported the solution and tried to import to the server but mentioned warning occurs and on the server solution uses the old version of DB?!

Current Status: solution works with latest DB model when started from developer but not with the latest when run via application server?

[warning]The server version of the column x of table y in server z has pk constraint while in the import version it has constraint.
[info] Import successful…

Any idea what am I doing wrong? Is there a work-around? Tried to delete and recreate the Database Server already
How to make application_serve to use the latest DB?

Regards

Hi Imre,

That is indeed weird. A restart of Server should always result in a fresh view on the actual database schema. Can you re-check if the database that the server uses has indeed those changes ?

Tokajac,

I could reproduce this using the same scenario.

Please file a case in our support system.

Rob

Imre,

This is fixed in Servoy 6.0.1.

Rob

Hi Rob,

Has this also been fixed in the 5.2.x version (if yes, what version)? We are experiencing this same problem using foxpro tables.

Hi michel,

Rob’s guidelines:
As a workaround you can delete some stuff from the repository tables.
When you do this, MAKE SURE TO MAKE A BACKUP FIRST!

  1. backup the servoy_repository tables
    2.using a db tool:
    delete from servoy_columninfo where tablename = ‘y’ and connection_name = ‘x’
  2. restart ApplicationServer
  3. re-import the solution

Regards

Even that did not work for my foxpro tables, I chose the more destructive path…

  1. backup
  2. stop server
  3. delete all tables in servoy_repository
  4. start server with -updateRepository argument
  5. start server
  6. import solution

Hello michel,

check with some DB maintenance tool that your real DB hasn’t been harmed by previous import which caused warnings;
If it’s harmed, restore it from healthy SQL and than do the work-around procedure again;

Regards