I have a large mySQL (InnoDB) database running on a production server, and I need to sync the staging DB with the production DB every once in a while.
One of the tables, let's called it generated_data, contains large amounts of data that change fairly often, therefore it doesn't need to be synced to the staging DB.
The problem is, another table contains an optional foreign key that points to generated_data, therefore I can't simply ignore the table. I need a way to set the foreign key to null when I perform the dump.