Database problem > Restore DB

1
In my production environment i unpack my .mda file (on server> putty). After a dumpdb i start a emptydb action. After that i start with the action restoredb. For the restore DB i used the backup from my test environment. After that i want to start my application and get the following error: ERROR: An error occurred while validating the datastore structure. Caused by: The table 'basis$declaratie' contains an auto-generated id field, but some system columns don't exist. If these columns don't exist, the table cannot be prepared for derivation from another table. Create the following columns with type 'int32' in the table 'basis$declaratie' and restart the data store validation: system$owner system$changedby createddate changeddate The problem is that there is NO declaratie record in my database. So i don't have a clue about this error. I tried to solve it by deleting the autonumber in the modeller (declaratienumber). Without succes.
asked
1 answers
3

This error is caused by a deficiency in the Mendix 2.* database synchronization algorithm, which has been solved in the completely rewritten algorithm in Mendix 3.0. As a work-around, it is most convenient to add the four columns manually to the table in the database (not in the model). As Samet says, they aren't all of type int32. Create the following columns:

  • system$owner, type: integer
  • system$changedby, type: integer
  • createddate, type: timestamp without time zone
  • changeddate, type: timestamp without time zone

It does not matter whether there are zero or more rows in the table.

answered