Hi, we currently have some procedures on our project database which we’ve manually added to the database instead of through the Software Factory. We have several reasons for doing this.
I thought the Software Factory wouldn’t drop objects in schema’s other than dbo. I think I read some other question which mentioned objects in other schema’s wouldn’t be dropped but I can’t find it now. It’s also mentioned in this documentation: https://docs.thinkwisesoftware.com/blog/2023.2#deployment---only-dropping-objects-in-dbo-schema
Our manual procedures exist in a different schema but the Software Factory still tries to drop them and this causes errors.
This is part of the code in execute source code which tries to drop our procedures:
/* Drop all procedures */
declare @procedure_name varchar(255)
declare drop_objects cursor fast_forward for
select quotename(s.name)
from sysobjects s
where s.type = 'P'
and s.name not like 'def$_%' escape '$' -- Do not drop defaults.
and s.name not like 'lay$_%' escape '$' -- Do not drop layouts.
and s.name not like 'ctx$_%' escape '$' -- Do not drop contexs.
and s.name not like 'task$_%' escape '$' -- Do not drop tasks.
and s.name not like 'prc$_%' escape '$' -- Do not drop processes.
and s.name not like 'bdg$_%' escape '$' -- Do not drop badges.
and s.name not like 'chg$_%' escape '$' -- Do not drop change detection.
and s.name not like 'ins$_%' escape '$' -- Do not drop insert handler.
and s.name not like 'upd$_%' escape '$' -- Do not drop update handler.
and s.name not like 'del$_%' escape '$' -- Do not drop delete handler.
...
This clearly gets all procedures in any schema. I can easily modify this to ignore our schema but next creation it will be back to how it was. I even tried searching for the code that generates the source code so I could add my exception on the Software Factory itself but I had no luck finding it.
How do I get the software factory to ignore my manual procedures?