abstract class SchemaState

Properties

protected Connection $connection

The connection instance.

protected Filesystem $files

The filesystem instance.

protected string|null $migrationTable

The name of the application's migration table.

protected Closure $processFactory

The process factory callback.

protected mixed $output

The output callable instance.

Methods

__construct(Connection $connection, Filesystem|null $files = null, callable|null $processFactory = null)

Create a new dumper instance.

void
dump(Connection $connection, string $path)

Dump the database's schema into a file.

void
load(string $path)

Load the given schema file into the database.

array
baseVariables(array $config)

Get the base variables for a dump / load command.

Process
makeProcess(mixed ...$arguments)

Create a new process instance.

bool
hasMigrationTable()

Determine if the current connection has a migration table.

string
getMigrationTable()

Get the name of the application's migration table.

withMigrationTable(string|null $table)

Specify the name of the application's migration table.

handleOutputUsing(callable $output)

Specify the callback that should be used to handle process output.

Details

at line 42
__construct(Connection $connection, Filesystem|null $files = null, callable|null $processFactory = null)

Create a new dumper instance.

Parameters

Connection $connection
Filesystem|null $files
callable|null $processFactory

at line 59
abstract void dump(Connection $connection, string $path)

Dump the database's schema into a file.

Parameters

Connection $connection
string $path

Return Value

void

at line 64
abstract void load(string $path)

Load the given schema file into the database.

Parameters

string $path

Return Value

void

at line 72
abstract protected array baseVariables(array $config)

Get the base variables for a dump / load command.

Parameters

array $config

Return Value

array

at line 77
Process makeProcess(mixed ...$arguments)

Create a new process instance.

Parameters

mixed ...$arguments

Return Value

Process

at line 85
bool hasMigrationTable()

Determine if the current connection has a migration table.

Return Value

bool

at line 95
protected string getMigrationTable()

Get the name of the application's migration table.

Return Value

string

at line 103
SchemaState withMigrationTable(string|null $table)

Specify the name of the application's migration table.

Parameters

string|null $table

Return Value

SchemaState

at line 113
SchemaState handleOutputUsing(callable $output)

Specify the callback that should be used to handle process output.

Parameters

callable $output

Return Value

SchemaState