[migraction] rename rename_relation method to rename_relation_type for consistency stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 17 Jul 2012 11:08:36 +0200
branchstable
changeset 8467 ad75430a2dc8
parent 8466 92c668170ef9
child 8468 f52bb4226020
child 8469 82272decfa99
[migraction] rename rename_relation method to rename_relation_type for consistency
doc/book/en/devrepo/migration.rst
server/migractions.py
--- a/doc/book/en/devrepo/migration.rst	Fri Jul 13 14:29:52 2012 +0200
+++ b/doc/book/en/devrepo/migration.rst	Tue Jul 17 11:08:36 2012 +0200
@@ -139,7 +139,7 @@
 * `drop_relation_type(rtype, commit=True)`, removes a relation type and all the
   definitions of this type.
 
-* `rename_relation(oldname, newname, commit=True)`, renames a relation.
+* `rename_relationi_type(oldname, newname, commit=True)`, renames a relation type.
 
 * `add_relation_definition(subjtype, rtype, objtype, commit=True)`, adds a new
   relation definition.
--- a/server/migractions.py	Fri Jul 13 14:29:52 2012 +0200
+++ b/server/migractions.py	Tue Jul 17 11:08:36 2012 +0200
@@ -1075,7 +1075,7 @@
         if commit:
             self.commit()
 
-    def cmd_rename_relation(self, oldname, newname, commit=True):
+    def cmd_rename_relation_type(self, oldname, newname, commit=True):
         """rename an existing relation
 
         `oldname` is a string giving the name of the existing relation
@@ -1526,6 +1526,10 @@
     def cmd_reactivate_verification_hooks(self):
         self.session.enable_hook_categories('integrity')
 
+    @deprecated("[3.15] use session.rename_relation_type(oldname, newname)")
+    def cmd_rename_relation(self, oldname, newname, commit=True):
+        self.session.rename_relation_type(oldname, newname, commit)
+
 
 class ForRqlIterator:
     """specific rql iterator to make the loop skipable"""