dashwood.net -

Ryan Stefan's Micro Blog

SQLAlchemy and Friends

Feb 242019
ALTER TABLE product_que ALTER COLUMN attempts TYPE integer USING attempts::integer;
ALTER TABLE product_que ALTER COLUMN amazon TYPE integer USING amazon::integer;
ALTER TABLE product_que ALTER COLUMN ebay TYPE integer USING ebay::integer;
ALTER TABLE product_que ALTER COLUMN etsy TYPE integer USING etsy::integer;
query = self.session.query(db.ProdQue).filter(or_(db.ProdQue.amazon > 0,
                                                          db.ProdQue.ebay > 0, db.ProdQue.etsy > 0)).limit(5000)

Comments