Re: [sqlalchemy] __table_args__ using func.lower(name) didn't work

2018-09-11 Thread Yingchen Zhang
🤣🤣🤣 how to do deceive alembic receive a "right" parameter. class col: def __init__(self, name): self.name = name def __str__(self): return self.name class model(db.Model): . __table_args__ = ( Index('idxname', func.lower(col('name')) ) ) .

Re: [sqlalchemy] __table_args__ using func.lower(name) didn't work

2018-09-11 Thread Mike Bayer
SQLAlchemy right now does not support reflection of so-called "functional" indexes that have a SQL function or similar inside of them. Therefore Alembic can't autogenerate these in terms of a table that already exists because there's nothing to compare towards, so you need to do those indexes manu

Re: [sqlalchemy] filter like using a string in a column of timestamps without time zones - postgres

2018-09-11 Thread George Brande
Thank you! You eliberated me to finally move to the next step in my project, this kept me at a standstill. Thank you ! marți, 11 septembrie 2018, 12:59:18 UTC+3, Simon King a scris: > > On Tue, Sep 11, 2018 at 9:39 AM George Brande > wrote: > > > > Hello. > > > > My angular is using a datep

Re: [sqlalchemy] filter like using a string in a column of timestamps without time zones - postgres

2018-09-11 Thread Simon King
On Tue, Sep 11, 2018 at 9:39 AM George Brande wrote: > > Hello. > > My angular is using a datepicker to send a date in string format(ex: > 2018-09-11) to my flask app to postgres via sqlalchemy. > In my postgres all rows have a column ef_time of timestamps type.(ex: > 2018-09-07 13:24:30.138) >

[sqlalchemy] filter like using a string in a column of timestamps without time zones - postgres

2018-09-11 Thread George Brande
Hello. My angular is using a datepicker to send a date in string format(ex: 2018-09-11) to my flask app to postgres via sqlalchemy. In my postgres all rows have a column ef_time of timestamps type.(ex: 2018-09-07 13:24:30.138) @app.route('/orders/') def get_orders(ide): session = Session() or