문제

I've got a database under source control using a VS2010 database project. I'm trying to move some stored procs from the [dbo] schema to another schema. When I change the schema name in the project (moved in folder structure plus edited the CREATE to indicate the new schema) and deploy, I end up with a CREATE for the proc in the new schema, but no corresponding DROP for the proc in the old schema. To the best of my knowledge, there's no dependency holding that proc in the old schema (and if there were, I'd want it to point to the proc in the new schema anyway).

Is this a VS bug, or am I doing something wrong?

도움이 되었습니까?

해결책

There is an option in the Database Project, Deploy tab, Deployment configuration:

Generate DROP statements for objects that are in the target database but that are not in the database project

if you check that, it should drop the old sproc

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top