Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Script execution failed, but mybatis happy #773

Open
GoogleCodeExporter opened this issue Apr 21, 2015 · 1 comment
Open

Script execution failed, but mybatis happy #773

GoogleCodeExporter opened this issue Apr 21, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Version 3.0.5

I did the following:
*Created a script attempting to add a foreign key to a table. 
*The script and mybatis ran through happily reporting success and adding an 
entry into the MIGRATION_CHANGELOG table. 

*Actual result: However, the foreign key was missing. After attempting to 
execute the statement from the script via SQL Server Managment Studio I got an 
error (see below). This error was nowhere to be seen during the mybatis run.

*Expected result: mybatis to report an error and fail on this script.


When attempting to execute said foreign key SQL Server returned:
Msg 1785, Level 16, State 0, Line 1
Introducing FOREIGN KEY constraint 'FK_my_new_fk' on table 'my_table' may cause 
cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO 
ACTION, or modify other FOREIGN KEY constraints.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.

DB: MS SQL Server 2008
OS: MS Windows Server 2008 R2

Original issue reported on code.google.com by Ted.Samu...@gmail.com on 13 Feb 2013 at 5:01

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant