server/migractions.py
changeset 10632 d89e9176d263
parent 10284 fb113f9fa7d8
child 10640 17bdc485c5b2
equal deleted inserted replaced
10631:1ab79c435fae 10632:d89e9176d263
  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