mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Change installation, remove tsv files and related tables, use migrations and seeding for them
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user