Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

There is already an object named 'AbpAuditLogs' in the datab #2279


User avatar
0
kacey created

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)
  • User Avatar
    0
    ismcagdas created
    Support Team

    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.

  • User Avatar
    0
    kacey created

    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.

  • User Avatar
    0
    ismcagdas created
    Support Team

    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.

  • User Avatar
    0
    kacey created

    MVC 5.x with angularJS.

  • User Avatar
    0
    kacey created

    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.

  • User Avatar
    0
    ismcagdas created
    Support Team

    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.

  • User Avatar
    0
    kacey created

    Thanks for your assistance.