Add version checking (#495)

This commit is contained in:
Régis Freyd
2017-07-24 23:19:49 -04:00
committed by GitHub
parent 12baca4411
commit 647e8fa4f8
24 changed files with 400 additions and 57 deletions
+7 -6
View File
@@ -27,7 +27,8 @@ class ExportAccountAsSQL
'accounts',
'subscriptions',
'import_jobs',
'import_job_reports'
'import_job_reports',
'instances'
];
protected $ignoredColumns = [
@@ -124,9 +125,9 @@ class ExportAccountAsSQL
}
}
}
// Specific to `accounts` table
$accounts = array_filter($tables, function ($e) {
$accounts = array_filter($tables, function ($e) {
return $e->table_name == 'accounts';
}
)[0];
@@ -139,9 +140,9 @@ class ExportAccountAsSQL
$values = [
$data['id'],
"'".addslashes($data['api_key'])."'",
$data['number_of_invitations_sent'] !== NULL
? $data['number_of_invitations_sent']
: 'NULL',
$data['number_of_invitations_sent'] !== NULL
? $data['number_of_invitations_sent']
: 'NULL',
];
$newSQLLine .= implode(',', $values) . ');' . PHP_EOL;
$sql .= $newSQLLine;