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:
parent
ca1e4d8ec7
commit
5ee9a60899
@ -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...');
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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();
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user