I have been using orm for my app, and try not to use sql to avoid sql syntax error when changing between different dbms.
At the moment I am testing with sqlite and mysql. I figured out to delete a table we can use:
db.session.query(models.MyTable).delete()
Unfortunately this method does not really "truncate" the table, because It does not reset the counting of autoincrement to 0.
Is there anyway to do the real truncate in SqlAlchemy orm ?