Mercurial > kallithea
changeset 7736:b0ed41df0282
db: drop __mapper_args__ that cause SQLAlchemy deprecation warnings
We don't really need them. There were only few uses left, and we seem to be
using .order_by() in all places where we really care about the ordering.
Gets rid of
<string>:2
<string>:2: SADeprecationWarning: Mapper.order_by is deprecated.Use Query.order_by() in order to affect the ordering of ORM result sets.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 07 Jun 2019 03:37:07 +0200 |
parents | 50b376bcdcda |
children | cbdc0c3a5406 |
files | kallithea/model/db.py |
diffstat | 1 files changed, 0 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/model/db.py Fri Jun 07 03:37:07 2019 +0200 +++ b/kallithea/model/db.py Fri Jun 07 03:37:07 2019 +0200 @@ -706,7 +706,6 @@ Index('uak_api_key_expires_idx', 'api_key', 'expires'), _table_args_default_dict, ) - __mapper_args__ = {} user_api_key_id = Column(Integer(), primary_key=True) user_id = Column(Integer(), ForeignKey('users.user_id'), nullable=False) @@ -728,7 +727,6 @@ Index('uem_email_idx', 'email'), _table_args_default_dict, ) - __mapper_args__ = {} email_id = Column(Integer(), primary_key=True) user_id = Column(Integer(), ForeignKey('users.user_id'), nullable=False) @@ -758,7 +756,6 @@ UniqueConstraint('user_id', 'ip_addr'), _table_args_default_dict, ) - __mapper_args__ = {} ip_id = Column(Integer(), primary_key=True) user_id = Column(Integer(), ForeignKey('users.user_id'), nullable=False) @@ -1470,7 +1467,6 @@ __table_args__ = ( _table_args_default_dict, ) - __mapper_args__ = {'order_by': 'group_name'} # TODO: Deprecated as of SQLAlchemy 1.1. SEP = ' » '