Databases.php
protected function archive()
    {
        if( $archiveDatabaseList = $this->getArchiveDatabaseList() )
        {
            foreach( $archiveDatabaseList as $database )
            {
                if( ! empty($tables = $this->getArchiveDatabaseTableList($database)) )
                {
                    $dbForge = $this->getDBForgeDifferentConnectionByDatabaseName($database);
    
                    foreach( $tables as $table )
                    {
                        $dbForge->dropTable($this->getTableNameWithoutExtension($table));
                    }
                }
    
                $tool = $this->getDBToolDifferentConnectionByDatabaseName($database);
    
                if( empty($tool->listTables()) )
                {
                    $this->forge->dropDatabase($database);
                }
            }

            return true;
        }
        
        return false;
    }
protected function archive()
    {
        if( $archiveDatabaseList = $this->getArchiveDatabaseList() )
        {
            foreach( $archiveDatabaseList as $database )
            {
                if( ! empty($tables = $this->getArchiveDatabaseTableList($database)) )
                {
                    $dbForge = $this->getDBForgeDifferentConnectionByDatabaseName($database);
    
                    foreach( $tables as $table )
                    {
                        $dbForge->dropTable($this->getTableNameWithoutExtension($table));
                    }
                }
    
                $tool = $this->getDBToolDifferentConnectionByDatabaseName($database);
    
                if( empty($tool->listTables()) )
                {
                    $this->forge->dropDatabase($database);
                }
            }

            return true;
        }
        
        return false;
    }
protected function archive ( ) { if ( $ archiveDatabaseList = $ this -> getArchiveDatabaseList ( ) ) { foreach ( $ archiveDatabaseList as $ database ) { if ( ! empty ( $ tables = $ this -> getArchiveDatabaseTableList ( $ database ) ) ) { $ dbForge = $ this -> getDBForgeDifferentConnectionByDatabaseName ( $ database ) ; foreach ( $ tables as $ table ) { $ dbForge -> dropTable ( $ this -> getTableNameWithoutExtension ( $ table ) ) ; } } $ tool = $ this -> getDBToolDifferentConnectionByDatabaseName ( $ database ) ; if ( empty ( $ tool -> listTables ( ) ) ) { $ this -> forge -> dropDatabase ( $ database ) ; } } return true ; } return false ; }
Protected Archives Database
Protected Archives Database