We’ve had no end of trouble with losing Db_Identities over the last couple of months - and recently realised that Navicat is dropping the DB_Id’s when using SQL Dumps.
Any way, thats an aside. I’ve just exported a solution with DB_Id’s set on the Db and on import to a server Servoy has warned that a number of the ID columns in the import have PK constraints whilst the current version has row_ident constraints???
Looking at the tables in the export server (through Servoy) the columns are in fact Db_ID’d and they have in some instances a Row Ident as pk, and Sequence Type of db identity. The ID’s have gone now in the solution imported though!
Is this a conflict??? Should the column be one or the other? Is that why on import the same solution is removing the Db_ID’s??
Very confused (spend morst of my days this we these days It’s better that way …)
We have in sql server, all of our primary key columns set to be db identity and auto increment.
When we look at the pk columns in servoy they are set with row ident ‘pk’ and sequence type of db_identity.
We have a production database hooked up to developer, which is manually detached from our test rig, copied and the re-attached to out production server, so we know that the structure between developer and production servers is identical.
We run a solution export from developer and then import it to our production server, through the process of which our identities are overwritten…??
BUMP - we could really do with some Servoy input on this as its a potential show stopper during roll-outs. We have now had to implement a re-test and update routine to ensure lost db_id’s are reset! Some clarity required!
Not sure I understand the issue here, is the problem at import? (developer import or app server import) What do you mean by ids are lost, the database structure is wrong after import, or the data is lost ? From what I understand, you have a row_ident column in Servoy and through import you want to change it to primary key column. Is that right ?
The issue is that we have our test db set up to have both identity and pk on certain columns, and Servoy seems to be removing the identity on the columns after import to our production server.
The issue is that we have our test db set up to have both identity and pk on certain columns, and Servoy seems to be removing the identity on the columns after import to our production server.
Very frustrating
When you import in production there are no tables defined before import, right ? What sequence type does the production column has after import? Are you sure the export is correctly done (so column has db identity sequence type in .servoy file)?
All tables are currently defined, populated and are identicle on both production and test before import, but after import, the table columns have been altered by servoy on the production server.
Zuke:
All tables are currently defined, populated and are identicle on both production and test before import, but after import, the table columns have been altered by servoy on the production server.
Ok, but which exactly is the difference (before and after import in production server)? Did you check: Override existing sequence type definitions (in repository) with the sequence types contained in the import file. when importing ?
Zuke:
We do not need to override as everything should be as is, we have not specifically set anything in servoy either.
I expected servoy to use whatever is set up in the database unless otherwise specified or is this not the case?
At import Servoy will update the database structure and column information. There is an option at import not to allow database structure modifications, also there are other options for column information, like override sequence type. If “Override existing sequence type definitions (in repository) with the sequence types contained in the import file.” is false, then Servoy will not change a sequence type.
Zuke:
We do not need to override as everything should be as is, we have not specifically set anything in servoy either.
I expected servoy to use whatever is set up in the database unless otherwise specified or is this not the case?
At import Servoy will update the database structure and column information. There is an option at import not to allow database structure modifications, also there are other options for column information, like override sequence type. If “Override existing sequence type definitions (in repository) with the sequence types contained in the import file.” is false, then Servoy will not change a sequence type.
Laurian - here’s what happens:
Our current Cloud Server Db’s are correct and showing Db Identities set.
Our local version tables also are correct and have Db Identities set.
On import of a solution to the Cloud server (exported from our local system) where the Servoy columns are showing (in Row Ident) pk - and even though they show db identity as the sequence type and the tables are set as db_identity - the import shows a warning
"The server version of the column ‘xyz_id’ of table ‘some_table’ in server ‘some server’ has row_ident constraint while in the import version it has pk constraint. "
We have not set the column as pk and we have set it to db_identity.
We dont touch either of these:
Override existing sequence type definitions (in repository) with the sequence types contained in the import file.
Override existing default values (in repository) with the default values contained in the import file.
So after import out Db Identities are gone and our Db’s fail on new record additions.
Q. What is the difference between the Servoy pk constraint (with sequence type set to db_identity) and row_ident???
Q. How can we set the local columns to NOT show pk constraint in Servoy other than deleting the column and recreating it (hundreds of table)?
Q. How should we do the import to protect our db_idents?
Q. What is the difference between the Servoy pk constraint (with sequence type set to db_identity) and row_ident???
First of all, the constraint (pk,row ident) is a different thing than sequence type. Pk constraint comes from database (Servoy will read pk information from the table), row_ident is a Servoy information, so that you can mark a column to be considered a pk, even if in the database there is no constraint for this.
Q. How can we set the local columns to NOT show pk constraint in Servoy other than deleting the column and recreating it (hundreds of table)?
If the pk constraint exists in database, it will be read by Servoy. Why would you want to drop the pk constraint?
Q. How should we do the import to protect our db_idents?
If option: Override existing sequence type definitions (in repository) with the sequence types contained in the import file. is false, the sequence type will not be changed.
lvostinar:
If option: Override existing sequence type definitions (in repository) with the sequence types contained in the import file. is false, the sequence type will not be changed.
Hope this brings more light to the issue.
Afraid not Laurian.
We have Db_Identities set on our server tables, AND our local tables. Some of the local tables have pk in the row_ident column of the Servoy table view.
When exporting the local solution and importing it to the server, and with the ‘Override existing sequence type definitions (in repository)’ false, our Db_Identities on the server are being overwritten (and we get a warning in admin that the two (Export solution and server tables version) are different:
"The server version of the column ‘xyz_id’ of table ‘some_table’ in server ‘some server’ has row_ident constraint while in the import version it has pk constraint. "
So why is the server structure being overwritten and Db_Identities lost?
our Db_Identities on the server are being overwritten
Do you mean the sequence type for some column takes another value? (like servoy sequence) If so, which is the value it takes? Are you sure the export file (.servoy) is correct?
our Db_Identities on the server are being overwritten
Do you mean the sequence type for some column takes another value? (like servoy sequence) If so, which is the value it takes? Are you sure the export file (.servoy) is correct?
I mean the tables have DB Identities set on the server before importing the solution and they do not after importing the solution - where Servoy has pk in the row ident column???
our Db_Identities on the server are being overwritten
Do you mean the sequence type for some column takes another value? (like servoy sequence) If so, which is the value it takes? Are you sure the export file (.servoy) is correct?
I mean the tables have DB Identities set on the server before importing the solution and they do not after importing the solution - where Servoy has pk in the row ident column???
Seems to me the export file has different database information than what you have on the server, otherwise you would not get the warning about the constraint. Not sure what you mean by
tables have DB Identities set on the server before importing the solution and they do not after importing the solution
From what I understand the column has sequence type set to db identity before import, and that is changed to another value after import (would be helpful to know which is the new value). So, I think the import file must contain another value for sequence type than is normal to be overwritten.