diff --git a/src/Illuminate/Database/Migrations/Migration.php b/src/Illuminate/Database/Migrations/Migration.php index a58f7848a7e1..64c74353cddd 100755 --- a/src/Illuminate/Database/Migrations/Migration.php +++ b/src/Illuminate/Database/Migrations/Migration.php @@ -2,8 +2,17 @@ namespace Illuminate\Database\Migrations; +use Illuminate\Support\Facades\Schema; + abstract class Migration { + /** + * The database schema. + * + * @var \Illuminate\Database\Schema\Builder + */ + protected $schema; + /** * The name of the database connection to use. * @@ -18,6 +27,16 @@ abstract class Migration */ public $withinTransaction = true; + /** + * Create a new migration instance. + * + * @return void + */ + public function __construct() + { + $this->schema = Schema::connection($this->getConnection()); + } + /** * Get the migration connection name. *