Migration.php
TLDR
This file contains the Migration
class, which is an abstract class that represents a database migration.
Classes
Migration
The Migration
class is an abstract class that represents a database migration. It contains the following properties and methods:
Properties
-
$connection
: The name of the database connection to use. This is a protected property.
Methods
-
getConnection()
: This method returns the name of the migration connection. It returns a string ornull
.
<?php
namespace Illuminate\Database\Migrations;
abstract class Migration
{
/**
* The name of the database connection to use.
*
* @var string|null
*/
protected $connection;
/**
* Enables, if supported, wrapping the migration within a transaction.
*
* @var bool
*/
public $withinTransaction = true;
/**
* Get the migration connection name.
*
* @return string|null
*/
public function getConnection()
{
return $this->connection;
}
}