mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-03 23:27:31 -05:00 
			
		
		
		
	Update export migrations
This commit is contained in:
		
							parent
							
								
									b02bf18989
								
							
						
					
					
						commit
						37c7ec4265
					
				@ -17,7 +17,7 @@ class ExportMigrations extends Command
 | 
			
		||||
     *
 | 
			
		||||
     * @var string
 | 
			
		||||
     */
 | 
			
		||||
    protected $signature = 'migrations:export {--user=} {--random=}';
 | 
			
		||||
    protected $signature = 'migrations:export {--user=} {--email=} {--random=}';
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * The console command description.
 | 
			
		||||
@ -46,8 +46,36 @@ class ExportMigrations extends Command
 | 
			
		||||
        $this->info('Note: Migrations will be stored inside of (storage/migrations) folder.');
 | 
			
		||||
 | 
			
		||||
        if($this->option('user')) {
 | 
			
		||||
            $record = User::findOrFail($this->option('user'));
 | 
			
		||||
            $record = User::on(DB_NINJA_1)->find($this->option('user'));
 | 
			
		||||
 | 
			
		||||
            if($record)
 | 
			
		||||
                return $this->export($record);
 | 
			
		||||
 | 
			
		||||
            $record = User::on(DB_NINJA_2)->find($this->option('user'));
 | 
			
		||||
 | 
			
		||||
            if($record)
 | 
			
		||||
                return $this->export($record);
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
            $this->info('I could not find that user - sorry');
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        if($this->option('email')) {
 | 
			
		||||
            $record = User::on(DB_NINJA_1)->where('email', $this->option('user'))->first();
 | 
			
		||||
 | 
			
		||||
            if($record)
 | 
			
		||||
                return $this->export($record);
 | 
			
		||||
 | 
			
		||||
            $record = User::on(DB_NINJA_2)->where('email', $this->option('user'))->first();
 | 
			
		||||
 | 
			
		||||
            if($record)
 | 
			
		||||
                return $this->export($record);
 | 
			
		||||
 | 
			
		||||
            
 | 
			
		||||
            $this->info('I could not find that user by email - sorry');
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if($this->option('random')){
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user