1083 if not self.confirm('Relation %s is still present in the filesystem schema,' |
1083 if not self.confirm('Relation %s is still present in the filesystem schema,' |
1084 ' do you really want to drop it?' % oldname, |
1084 ' do you really want to drop it?' % oldname, |
1085 default='n'): |
1085 default='n'): |
1086 raise SystemExit(1) |
1086 raise SystemExit(1) |
1087 self.cmd_add_relation_type(newname, commit=True) |
1087 self.cmd_add_relation_type(newname, commit=True) |
1088 self.rqlexec('SET X %s Y WHERE X %s Y' % (newname, oldname), |
1088 if not self.repo.schema[oldname].rule: |
1089 ask_confirm=self.verbosity>=2) |
1089 self.rqlexec('SET X %s Y WHERE X %s Y' % (newname, oldname), |
|
1090 ask_confirm=self.verbosity>=2) |
1090 self.cmd_drop_relation_type(oldname, commit=commit) |
1091 self.cmd_drop_relation_type(oldname, commit=commit) |
1091 |
1092 |
1092 def cmd_add_relation_definition(self, subjtype, rtype, objtype, commit=True): |
1093 def cmd_add_relation_definition(self, subjtype, rtype, objtype, commit=True): |
1093 """register a new relation definition, from its definition found in the |
1094 """register a new relation definition, from its definition found in the |
1094 schema definition file |
1095 schema definition file |