I have a table that updates a timestamp column on every insert. This timestamp is indexed uniquely with a few other columns and I am unable to import this table. I guess the mysql dump/import inserts each row and some of the timestamps overlap because they are updated to the current timestamp. Is there a way to import and ignore the on update: current_timestamp() function that I have?


A unique timestamp is a mistake waiting to happen.

If there is also an AUTO_INCREMENT id, you can do this:

PRIMARY KEY(timestamp, id),

Then dups are not possible.

| improve this answer | |
  • "A unique timestamp is a mistake waiting to happen." lulz. – Evan Carroll Jan 19 '18 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.