Search code examples
mysqlphpstorm

PhpStorm : Generate a database Initialization script


When I do either these actions :

  • Right click on the schema / copy DDL
  • Compare 2 datasources / untick ignore order / click migrate left

The generated CREATE TABLE statements are alphabetically ordered.

Since there are foreign keys, I obviously get a useless script as I want to run it on an empty schema.

Is there a solution using PhpStorm or I have to use mysqldump ?


Solution

  • As LazyOne suggested I can't do that in phpstorm. That would be a nice feature indeed. I can't easily report the feature request...

    I therefore used a mysqldump extract.