Skip to content

Commit

Permalink
Revert "Merge pull request pacuna#15 from otepas/fix-migrate"
Browse files Browse the repository at this point in the history
This reverts commit 6425992, reversing
changes made to a7ee6cf.
  • Loading branch information
EspadaV8 committed Feb 19, 2019
1 parent 03e81aa commit c55c03b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/Pacuna/Schemas/Schemas.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use DB;
use Artisan;
use Schema;
use Config;

/**
* Class Schemas
Expand Down Expand Up @@ -85,8 +84,6 @@ public function create($schemaName)
*/
public function switchTo($schemaName = 'public')
{
$this->setSchemaInConnection($schemaName);

if (!is_array($schemaName)) {
$schemaName = [$schemaName];
}
Expand All @@ -97,16 +94,6 @@ public function switchTo($schemaName = 'public')
$result = DB::statement($query);
}

private function setSchemaInConnection($schemaName)
{
$driver = DB::connection()->getConfig('driver');
$config = Config::get("database.connections.$driver");
$config['schema'] = $schemaName;

DB::purge($driver);
Config::set("database.connections.$driver", $config);
}

/**
* Drop an existing schema
*
Expand Down

0 comments on commit c55c03b

Please sign in to comment.