IntegrityError duplicate key value violates unique constraint - django/postgres

SELECT setval('tablename_id_seq', (SELECT MAX(id) FROM tablename)+1)

 

posted @ 2015-03-16 10:39  r3call  阅读(1424)  评论(0编辑  收藏  举报