Hello,
When i put 'foreign_key_checks' => FALSE in preferences for backup database, the foreign key constraints appear in the backup file.
If i set it toTRUE, it's the same thing. For TRUE setting it's "normal" but with FALSE not yet.
There is a possible error ?
I use CI 3.06, driver mysqli (Mysql version 5.6.15)
My code:
$this->load->dbutil();
$prefs = array( 'newline' => "\n",
'add_drop' => TRUE,
'add_insert' => TRUE,
'format' => 'zip',
'filename' => 'back.sql',
'foreign_key_checks' => FALSE,
);
$backup = $this->dbutil->backup($prefs);
$this->load->helper('file');
$nom_export = date('Y_m_d').'_fuge.sql.zip';
write_file(UPLOAD.$nom_export, $backup);
The option doesn't remove the foreign keys, it only causes MySQL to ignore foreign key checks while importing the data, because that could otherwise make it impossible to import.
Thank you.
This is not the first time that you meet so unpleasant to people. I have found that your comrades have already made you such remarks when replying to different people asking for help or reporting a problem. Should learn to have restraint. This demonstrates the maturity.
Have a good day.
Sorry for asking you not to use our bug tracker as a free help request service, after you've done that 3 times.