Ordenamiento de tables BPMN en backup
This commit is contained in:
@@ -489,6 +489,12 @@ class DataBaseMaintenance
|
|||||||
*/
|
*/
|
||||||
function backupDataBase ($outfile)
|
function backupDataBase ($outfile)
|
||||||
{
|
{
|
||||||
|
$tablesBpmn = array(
|
||||||
|
'BPMN_PROJECT','BPMN_DIAGRAM','BPMN_DOCUMENTATION','BPMN_EXTENSION','BPMN_PARTICIPANT',
|
||||||
|
'BPMN_PROCESS','BPMN_ACTIVITY','BPMN_ARTIFACT','BPMN_DATA','BPMN_EVENT','BPMN_GATEWAY',
|
||||||
|
'BPMN_LANESET','BPMN_BOUND','BPMN_FLOW','BPMN_LANE'
|
||||||
|
);
|
||||||
|
$sqlTablesBpmn = array();
|
||||||
$aTables = $this->getTablesList();
|
$aTables = $this->getTablesList();
|
||||||
$ws = explode( '_', $this->dbName );
|
$ws = explode( '_', $this->dbName );
|
||||||
$ws = isset( $ws[1] ) ? $ws[1] : $this->dbName;
|
$ws = isset( $ws[1] ) ? $ws[1] : $this->dbName;
|
||||||
@@ -510,9 +516,17 @@ class DataBaseMaintenance
|
|||||||
$tableSchema = "\nDROP TABLE IF EXISTS `$table`;\n\n";
|
$tableSchema = "\nDROP TABLE IF EXISTS `$table`;\n\n";
|
||||||
$tableSchema .= $this->getSchemaFromTable( $table );
|
$tableSchema .= $this->getSchemaFromTable( $table );
|
||||||
$data = $this->dumpSqlInserts( $table );
|
$data = $this->dumpSqlInserts( $table );
|
||||||
|
if (in_array($table, $tablesBpmn)) {
|
||||||
|
$sqlTablesBpmn[$table] = $tableSchema . $data;
|
||||||
|
} else {
|
||||||
fwrite( $file, $tableSchema );
|
fwrite( $file, $tableSchema );
|
||||||
fwrite( $file, $data );
|
fwrite( $file, $data );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($tablesBpmn as $table) {
|
||||||
|
fwrite( $file, $sqlTablesBpmn[$table] );
|
||||||
|
}
|
||||||
|
|
||||||
fclose( $file );
|
fclose( $file );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user