Export database with constraints at the end of backup file - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Export database with constraints at the end of backup file (/showthread.php?tid=64764) |
Export database with constraints at the end of backup file - casa - 03-23-2016 Hello, I want to make a database export with constraints of the tables, but with constraints written at the end of the backup file. I use MySQL database. I use $this->dbutil->backup($prefs) but in array $prefs, is any parameter to say "put constraints at the end of backup file" ? . For the moment, i have for eaxmple in the backup file : PHP Code: //--- first table I want to make an export like that foreach table : - first create table - insert into table Only when this is ended, add foreign constraints key on table. PHP Code: // first Thank you for your help RE: Export database with constraints at the end of backup file - perledisaggese - 06-08-2016 This is an important question, I too would like to know a solution. I just discovered that the intelligent backups created every day by my applications aren't immediately usable for restore. I need to decompress them, edit them moving the constraint to the bottom, often re-compress, and try the upload... |