1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Prevent docker installations from reaching some test data creation console commands

This commit is contained in:
David Bomba 2021-10-22 06:57:07 +11:00
parent ca1e4d8ec7
commit 5ee9a60899
4 changed files with 10 additions and 31 deletions

View File

@ -90,6 +90,10 @@ class CreateSingleAccount extends Command
*/
public function handle()
{
if(config('ninja.is_docker'))
return;
MultiDB::setDb($this->option('database'));
$this->info(date('r').' Create Single Sample Account...');

View File

@ -78,6 +78,9 @@ class CreateTestData extends Command
*/
public function handle()
{
if(config('ninja.is_docker'))
return;
$this->info(date('r').' Running CreateTestData...');
$this->count = $this->argument('count');

View File

@ -86,6 +86,9 @@ class DemoMode extends Command
{
set_time_limit(0);
if(config('ninja.is_docker'))
return;
$cached_tables = config('ninja.cached_tables');
foreach ($cached_tables as $name => $class) {

View File

@ -59,37 +59,6 @@ class SubdomainFill extends Command
});
// $db1 = Company::on('db-ninja-01')->get();
// $db1->each(function ($company){
// $db2 = Company::on('db-ninja-02a')->find($company->id);
// if($db2)
// {
// $db2->subdomain = $company->subdomain;
// $db2->save();
// }
// });
// $db1 = null;
// $db2 = null;
// $db2 = Company::on('db-ninja-02')->get();
// $db2->each(function ($company){
// $db1 = Company::on('db-ninja-01a')->find($company->id);
// if($db1)
// {
// $db1->subdomain = $company->subdomain;
// $db1->save();
// }
// });
}
}