# HG changeset patch # User Sylvain Thénault # Date 1342516116 -7200 # Node ID ad75430a2dc835aa2b5fdbe13f25102e321cd489 # Parent 92c668170ef95eb51747ae14a0e64a14c9ce46b1 [migraction] rename rename_relation method to rename_relation_type for consistency diff -r 92c668170ef9 -r ad75430a2dc8 doc/book/en/devrepo/migration.rst --- 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. diff -r 92c668170ef9 -r ad75430a2dc8 server/migractions.py --- 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"""