During the database schema synchronization FOREIGN_KEY_CHECKS=0 is using.
That means, If I don’t import all the necessary tables, the schema may be incomplete.
Is there a way to check the the schema integrity to find all the missing foreign tables?
Looking forward for response,
Thanks in advance.
Schema integrity verification
Schema integrity verification
Last edited by zhekaus on Thu 12 Oct 2017 18:04, edited 1 time in total.
Re: Schema integrity verification
We will review this post and will answer you as soon as possible.
Re: Schema integrity verification
From the MySQL documentation, when setting FOREIGN_KEY_CHECKS=0, the table creation order does not depend on the foreign keys. Upon synchronization, all the objects should be created. You can check this by creating a test database and synchronizing it with the source one.
Also, you can use the 'Ignore foreign keys' synchronization option. In this case, the foreign keys will not affect the database synchronization. After that, you can exclude the option and create the foreign keys.
Also, you can use the 'Ignore foreign keys' synchronization option. In this case, the foreign keys will not affect the database synchronization. After that, you can exclude the option and create the foreign keys.
Re: Schema integrity verification
Thank you very much for the response.
I made the check on my own. In fact, it is not so difficult. All is needed is stored in information_schema.
PS. Btw, I think it’s a good idea to have such a verification as a dbForge feature.
I made the check on my own. In fact, it is not so difficult. All is needed is stored in information_schema.
PS. Btw, I think it’s a good idea to have such a verification as a dbForge feature.
Re: Schema integrity verification
In our previous reply we were referring to another our product which is dbForge Schema Compare for MySQL.
Please note that there is the 'Disable foreign keys' option on the 'Options' page of the data synchronization wizard of dbForge Data Compare for MySQL. This option adds at the beginning of the script and at the end.
Please note that there is the 'Disable foreign keys' option on the 'Options' page of the data synchronization wizard of dbForge Data Compare for MySQL. This option adds
Code: Select all
FOREIGN_KEY_CHECKS=0
Code: Select all
FOREIGN_KEY_CHECKS=1