python - Django - mysql IntegrityError 1062 -
i have cron job downloads data mysql every night @ 3. can test connection , download , works. download partially fails. (partial download) if try , re-run py script, barks. duplicate entry error key 2. i want able run script , erase entries previous night can rerun script populates db. there 3 other tables tied one. django going if create sql script deletes yesterdays records? automatically delete necessary additions other tables, or should in script also? traceback (most recent call last): file "manage.py", line 10, in <module> execute_from_command_line(sys.argv) file "/usr/local/lib/python2.6/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line utility.execute() file "/usr/local/lib/python2.6/site-packages/django/core/management/__init__.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) file "/usr/local/lib/python2.6/site-packages/django/core/manag