disable foreign key checks in sql structure script

In sql structure dump tables are dumped ordered by table name, which may cause problems with foreign keys when applying the schema. As a workaround, we can temporarily disable FK checks in sql structure script.