Monday, May 13, 2019

Problem with the database "Introducing FOREIGN KEY constraint 'FK_bridge_Post_info_Post_ID' on table 'bridge' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints."

Failed executing DbCommand (9ms) [Parameters=[], CommandType='Text', CommandTimeout='30']

CREATE TABLE [bridge] (

[Category_ID] int NOT NULL,

[Post_ID] int NOT NULL,

CONSTRAINT [PK_bridge] PRIMARY KEY ([Category_ID], [Post_ID]),

CONSTRAINT [FK_bridge_Category_info_Category_ID] FOREIGN KEY ([Category_ID]) REFERENCES [Category_info] ([Category_ID]) ON DELETE CASCADE,

CONSTRAINT [FK_bridge_Post_info_Post_ID] FOREIGN KEY ([Post_ID]) REFERENCES [Post_info] ([Post_ID]) ON DELETE CASCADE );

So I got this error above while trying to create a model "bridge", which can be use to connect to my 2 other models, but after I got this error, I just want to delete the bridge and not use it anymore. So the problem is, after I try delete that model and drop the database, and try to update database again, it will always show me this error, even I don't have the "bridge" model anymore. Any idea how to solve this?

Problem with the database "Introducing FOREIGN KEY constraint 'FK_bridge_Post_info_Post_ID' on table 'bridge' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints." Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team