MemberJunction / MJ

Main MemberJunction Repository
https://docs.memberjunction.org/
ISC License
4 stars 0 forks source link

Handle Deleted Tables in Metadata #341

Open AN-BC opened 3 weeks ago

AN-BC commented 3 weeks ago

When a sysadmin deletes a table in the database, we need to "clean up" the next time we run CodeGen.

We should: 1) Look for this condition and possible ask the sysadmin if they want clean up services 2) If yes (or maybe always do that, need to decide), we remove the entity metadata including Entity/EntityField/EntityPermission/EntityFieldValue/etc 3) We also remove generated artifacts from the database like generated base views, procs, triggers, etc 4) Finally, we clean up our generated cache of files in the generated/schemaname/filename format so that we don't attempt to recompile views/procs that won't work anymore - this causes non critical COdeGen errors when not cleaned up

Seems like a pretty easy task for someone to take on once we define the requirements more clearly @cadam11 ?