Change installation, remove tsv files and related tables, use migrations and seeding for them

This commit is contained in:
DariusIII
2018-01-18 12:13:49 +01:00
parent ee955bff77
commit 59eecdfd0d
39 changed files with 23385 additions and 2667 deletions
+7 -3
View File
@@ -97,14 +97,18 @@ if (! $error) {
);
$pdo->exec('SET FOREIGN_KEY_CHECKS=0;');
try {
$DbSetup->processSQLFile(); // Setup default schema
$DbSetup->loadTables(); // Load default data files
} catch (\PDOException $err) {
ColorCLI::doEcho(ColorCLI::header('Migrating tables and populating them'));
passthru('php '.NN_ROOT.'artisan migrate');
passthru('php '.NN_ROOT.'artisan db:seed');
} catch (\RuntimeException $err){
$error = true;
ColorCLI::doEcho(ColorCLI::error('Error inserting: ('.$err->getMessage().')'));
ColorCLI::doEcho(ColorCLI::error('Error (' . $err->getMessage() . ')'));
}
if (! $error) {
// Check one of the standard tables was created and has data.
$dbInstallWorked = false;