Commit bb963283 authored by smk-ka's avatar smk-ka

#312215 by rondp: Added foreign key support.

parent f63199c6
......@@ -12,6 +12,7 @@ Demo 5.x-1.x, xxxx-xx-xx
#272526 by smk-ka: Added file size to snapshot list.
#268056 by sun: Fixed incomplete snapshots due to max_execution_time reached.
#265801 by smk-ka: Added exclusion of data in cache tables for snapshots.
#312215 by rondp: Added foreign key support.
Demo 5.x-1.4, 2008-04-29
......
......@@ -21,6 +21,8 @@ function demo_dump_db($filename, $exclude = array()) {
$header .= "--\n";
$header .= "-- Database: ". _demo_get_database() ."\n";
$header .= "-- Date: ". format_date(time(), 'large') ."\n";
// Temporarily disable foreign key checks for the time of import.
$header .= "SET FOREIGN_KEY_CHECKS = 0;\n";
fwrite($fp, $header);
foreach (demo_enum_tables() as $table) {
......@@ -33,6 +35,9 @@ function demo_dump_db($filename, $exclude = array()) {
}
}
// Re-enable foreign key checks.
fwrite($fp, "\nSET FOREIGN_KEY_CHECKS = 1;\n");
fclose($fp);
return TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment