简体   繁体   中英

VS2010 DB Project - moving stored proc to another schema

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM