<div dir="ltr">I don't know what the database engine you are using, but most of them support the following syntax to erase all rows and reset autoincrement counters on the table:<br><br><div>TRUNCATE table_name</div><div>
<br></div><div>where table_name is the name of the table to be erased.</div><div><br></div><div>This is exactly what you whould like to have.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/12/19 Guy Jacks <span dir="ltr"><<a href="mailto:guy.jacks@gmail.com" target="_blank">guy.jacks@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I'm currently calling.<div><br></div><div>db.drop_table(...) and then calling db.create_tables() in order to purge all of the data. I'm using flask so I wrapped my app in the with_transaction context. I'm getting the following error.</div>
<div><br></div><div><a href="https://gist.github.com/anonymous/9005f162fc6f352a73fc" target="_blank">https://gist.github.com/anonymous/9005f162fc6f352a73fc</a><br></div><div><br></div><div>Note, I don't want to delete all the rows because I want to reset the auto-increment on the ids.</div>
</div>
<br>_______________________________________________<br>
ponyorm-list mailing list<br>
<a href="mailto:ponyorm-list@ponyorm.org">ponyorm-list@ponyorm.org</a><br>
<a href="/ponyorm-list" target="_blank">/ponyorm-list</a><br>
<br></blockquote></div><br></div>