I just downloaded a fresh project from aspnet boilerplate website. Without making any changes to code, I ran update-database command on the solution and it gives me the following error: 'There is already an object named 'AbpAuditLogs' in the database.'
How do I resolve this please?
7 Answer(s)
-
0
Hi,
Can you check the connection string of your project and be sure database does not exists ? It seems like database you are trying to migrate already exists and has this table.
-
0
It doesn't exist. I made sure of it. And it's a pretty new project downloaded from the site and I was running it for the first time. I also downloaded another project with a different name entirely and it gave me the same problem.
-
0
Hi,
Which options did you choose when downloading the project ? MVC 5.x or ASP.NET Core ? AngularJS or Multi Page Web Application etc.
I will try the same case.
-
0
MVC 5.x with angularJS.
-
0
I found a solution to it and it's a strange one. Once I made the web project the startup project and tried again, it executed successfully. I don't know why, but it worked.
-
0
I'm glad that you solved it :). I think it was trying to connect some other database.
If you want, you can set previous startup project as startup project again and run "Update-Database -Verbose" and see if the connection string is correct or not.
-
0
Thanks for your assistance.