[This topic is migrated from our old forums. The original author name has been removed]
When I export database structure the resulting script gives table's CREATE in alphabetical order, and doesn't take care of PK and FK.
(Engine used : Innodb)
Thus, script must be re-ordered to be usable in command line or any other MySQL client.
+*Same problem with data export.*+
Two tables : client, advice
bq. client.idclient (PK), client.name ... \\ advice.idadvice (PK), advice.idclient (FK), advice.label ... \\ advice.idclient is defined as FK to client
Script generated starts with CREATE TABLE advice... before CREATE TABLE client...
Same problem with datas, so scripts can't be use correctly without editing them manually.
Do I missed a setting somewhere ?
DbVisualizer Pro 9.1.13
over 6 years ago
[This reply is migrated from our old forums.]
Re: MySQL : Export Database structure: tables order
Do you have the Database Type set correctly for the connection, i.e. to either Auto Detect or MySQL?
The generated script should create the tables in alphabetic order, as you describe, but without FKs. The FKs are added with generated ALTER TABLE statements after all CREATE TABLE statements.