--- a/server/migractions.py Fri Dec 19 12:39:42 2014 +0100
+++ b/server/migractions.py Mon Dec 22 14:39:50 2014 +0100
@@ -1061,12 +1061,9 @@
def cmd_drop_relation_type(self, rtype, commit=True):
"""unregister an existing relation type"""
- rschema = self.repo.schema[rtype]
- if rschema.rule:
- etype = 'CWComputedRType'
- else:
- etype = 'CWRType'
- self.rqlexec('DELETE %s X WHERE X name %r' % (etype, rtype),
+ self.rqlexec('DELETE CWRType X WHERE X name %r' % rtype,
+ ask_confirm=self.verbosity>=2)
+ self.rqlexec('DELETE CWComputedRType X WHERE X name %r' % rtype,
ask_confirm=self.verbosity>=2)
if commit:
self.commit()