cubicweb/hooks/syncschema.py
changeset 11231 b0dcbc7cf410
parent 11129 97095348b3ee
child 11291 7c565548fb09
--- a/cubicweb/hooks/syncschema.py	Tue Apr 05 09:10:17 2016 +0200
+++ b/cubicweb/hooks/syncschema.py	Mon Mar 21 17:09:41 2016 +0100
@@ -992,7 +992,8 @@
         # delete every entities of this type
         if name not in ETYPE_NAME_MAP:
             MemSchemaCWETypeDel(self._cw, etype=name)
-        DropTable(self._cw, table=SQL_PREFIX + name)
+        if not self.entity.final:
+            DropTable(self._cw, table=SQL_PREFIX + name)
 
 
 class AfterDelCWETypeHook(DelCWETypeHook):