Projects:Prevent Cascade Constraint Deletion/Specs
When updating the database, every FK constraint which references AD tables is being deleted. This can cause performance issues because of the cost of time dropping and recreating the constraints and also because of the time expended in some deletion queries that are being executed. The constraints which need to be dropped and recreated are only those which reference tables which have had deletion or insertion changes. The deletion queries must be only executed for those tables which have a foreign key referencing a table that have had deletion changes.
On one hand, the drop of the FK constraints will be restricted and only those which reference to AD tables which actually have deletion or insertion changes will be drop. This implies to recreate only those FK which have been dropped.
On the other hand, the rows deletion queries will be reduced, now only those tables which have a FK referencing a AD Table that actually has deletion changes will execute those queries.