I am getting the below error message when I try to use the Update-Database. I tried both creating a new database from scratch and just allowing the Package manger creating the database but neither works.
Error Number:2714,State:6,Class:16 There is already an object named 'AbpPermissions' in the database.
Any help would be greatly appreciated.
7 Answer(s)
-
0
It tries to create the sample table twice. Have you added new migrations on the standard migrations coming from AspNet Zero template? Also, you can share the migration code that causes the error.
-
0
No this was the first time I was going to start the application. I haven't done any customization's yet. Whats really weird is today it worked just fine and I didn't do anything but restarted my computer.
-
0
The only possiblity, you may deleted the MigrationHistory table of EF. If you create an empty database, it should work. Also, check your connection string (You can add -Verbose parameter to your Update-Database command). I tried it again, there is no problem with Migrations.
-
0
I am having the same issue. Sometimes the "Update-Database" command will work, and sometimes I'll get the permissions table error. Weird.
-
0
This was right after creating a new database. I'll post more detailed information if it continues to be a problem.
-
0
I think if you currently have a migration or seed class open in Visual Studio it will fail, and work if you have any other class currently open. So to replicate the error, open a seed/migration class, and attempt to run Update-Database.
-
0
It's very strange, thank you for the information.