MySQL import and export data without update on insert

migrationMySQL

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?

Best Answer

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),
INDEX(id)

Then dups are not possible.