Mysql / Django - Begin auto increment to 1

Posted by ark on Stack Overflow See other posts from Stack Overflow or by ark
Published on 2011-01-15T17:44:58Z Indexed on 2011/01/15 17:53 UTC
Read the original article Hit count: 209

Filed under:
|
|

Hi,

I have a django script which loads data, the beginning of the script deletes all datas in database. So when I execute 1st time this script, the auto increment primary keys begin to 1 to 15 (if 15 objects) and if I want to reload data, I reexecute the script. My issue is when I execute it again, pks numbers begin to 16 (for 2nd launch), I would like each time auto_increment begins to 1, is it possible whitout regenerating tables structure each time ?

Thanks

© Stack Overflow or respective owner

Related posts about mysql

Related posts about database