Skip to main content

Migration error

question_mark_1.png

Question

What to do if the following error occurs during migration?
(Column 'AspNetUsers.Id' is not of same collation as referencing column 'VisitedDetails.UserId' in foreign key 'FK_VisitedDetails_AspNetUsers_UserId'.
Could not create constraint or index. See previous errors.)


Answer

Make sure that the database table and the database itself have the same collation.