You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using this tool to automatically update the structure of my database during the deployment process.
I have a folder with all scripts from version 000001.sql to version 000020.sql
Before creating of the last script (000020.sql) I didn't have any problems, but now the tool doesn't update the database.
For example: I have to update a DB where scripts number 11,12,13 and 20 are missing.
The result of the Install-DBOScript command is the following, but the database is not updated.
Do you have any idea what the problem might be?
The text was updated successfully, but these errors were encountered:
Could you run this with a -Debug switch and see if there's extra output that could be useful? The only reason for this behaviour I can think of is that one of the scripts has a statement that changes the DB context (like USE in SQL Server); in such scenario the journal in the current database won't register your changes.
I tried to run the command with the -Debug parameter and that is the result:
But, I found that the problem is related to the script 000011.sql because this script start a transaction, make some changes to the DB and (for unknow reason) the transaction still pending. Removing this transaction all scripts are executed fine.
The quesiton is, why DBOPS return the "Upgrade successful" also if I have this issue?
The quick answer here is that the underlying framework (DbUp) is reporting the deployment as successful, but I guess what really happens is that once the connection is terminated, the transaction is rolled back. I'll have to play with it to see if it's even possible to detect, if that's the case.
Hi,
I'm using this tool to automatically update the structure of my database during the deployment process.
I have a folder with all scripts from version 000001.sql to version 000020.sql
Before creating of the last script (000020.sql) I didn't have any problems, but now the tool doesn't update the database.
For example: I have to update a DB where scripts number 11,12,13 and 20 are missing.
The result of the Install-DBOScript command is the following, but the database is not updated.
Do you have any idea what the problem might be?
The text was updated successfully, but these errors were encountered: