Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Delete table in database project

I am working on a .NET project which includes a database project (Dacpac).

I am attempting to delete a table, but when I publish the database project, the table is not deleted in the destination database.

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I deleted the table in the database project, and as expected result, the table should have been deleted in the destination. However, the result was not as expected.

>Solution :

If you want the table to be deleted in the destination you need to configure your publish profile to "Drop objects in target but not in source" option.
Here where you can activate it.

After selecting ‘Publish’ on your database project you need to go to the ‘Advanced’ settings :

Advanced settings

Then go to the ‘Drop’ tab, and check "Drop objects in target but not in source":

Drop tab

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading