X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=admin%2Fdb%2Fmaintenance_db.inc;h=ed14e56a1de1e438b9eef8eee6cf1baaca07fb0c;hb=20c9b5846824f0489c6791d74a6c78e2bfb0b2fc;hp=f1acc83aea6ec1477ce1bbfb4cab64ce6ed71040;hpb=82b708ce1f54b7b3102dd7aa5bad64befd65f8d4;p=fa-stable.git diff --git a/admin/db/maintenance_db.inc b/admin/db/maintenance_db.inc index f1acc83a..ed14e56a 100644 --- a/admin/db/maintenance_db.inc +++ b/admin/db/maintenance_db.inc @@ -482,7 +482,7 @@ function db_backup($conn, $ext='no', $comm='', $tbpref = TB_PREF) // generates a dump of $db database // $drop and $zip tell if to include the drop table statement or dry to pack -function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF) +function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF, $no_default=false) { global $app_title, $version, $power_url, $path_to_root; @@ -573,6 +573,8 @@ function db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF) $out.="### Structure of table `".$tablename."` ###\n\n"; $out.="DROP TABLE IF EXISTS `".$tablename."`;\n\n"; + if ($no_default && ($def_pos = strpos($table_sql[$tablename], "DEFAULT CHARSET")) > 0) + $table_sql[$tablename] = substr($table_sql[$tablename], 0, $def_pos); $out.=$table_sql[$tablename]; // add auto_increment value