class MariaDbSchemaState extends MySqlSchemaState (View source)

Properties

protected Connection $connection

The connection instance.

from  SchemaState
protected Filesystem $files

The filesystem instance.

from  SchemaState
protected string $migrationTable

The name of the application's migration table.

from  SchemaState
protected callable $processFactory

The process factory callback.

from  SchemaState
protected callable $output

The output callable instance.

from  SchemaState

Methods

void
__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.

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.

$this
withMigrationTable(string $table)

Specify the name of the application's migration table.

$this
handleOutputUsing(callable $output)

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

void
removeAutoIncrementingState(string $path)

Remove the auto-incrementing state from the given schema dump.

void
appendMigrationData(string $path)

Append the migration data to the schema dump.

string
baseDumpCommand()

Get the base dump command arguments for MariaDB as a string.

string
connectionString()

Generate a basic connection string (--socket, --host, --port, --user, --password) for the database.

array
baseVariables(array $config)

Get the base variables for a dump / load command.

Process
executeDumpProcess(Process $process, callable $output, array $variables, int $depth = 0)

Execute the given dump process.

Details

void __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

Return Value

void

void dump(Connection $connection, string $path)

Dump the database's schema into a file.

Parameters

Connection $connection
string $path

Return Value

void

void load(string $path)

Load the given schema file into the database.

Parameters

string $path

Return Value

void

Process makeProcess(mixed ...$arguments)

Create a new process instance.

Parameters

mixed ...$arguments

Return Value

Process

bool hasMigrationTable()

Determine if the current connection has a migration table.

Return Value

bool

protected string getMigrationTable()

Get the name of the application's migration table.

Return Value

string

$this withMigrationTable(string $table)

Specify the name of the application's migration table.

Parameters

string $table

Return Value

$this

$this handleOutputUsing(callable $output)

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

Parameters

callable $output

Return Value

$this

protected void removeAutoIncrementingState(string $path)

Remove the auto-incrementing state from the given schema dump.

Parameters

string $path

Return Value

void

protected void appendMigrationData(string $path)

Append the migration data to the schema dump.

Parameters

string $path

Return Value

void

protected string baseDumpCommand()

Get the base dump command arguments for MariaDB as a string.

Return Value

string

protected string connectionString()

Generate a basic connection string (--socket, --host, --port, --user, --password) for the database.

Return Value

string

protected array baseVariables(array $config)

Get the base variables for a dump / load command.

Parameters

array $config

Return Value

array

protected Process executeDumpProcess(Process $process, callable $output, array $variables, int $depth = 0)

Execute the given dump process.

Parameters

Process $process
callable $output
array $variables
int $depth

Return Value

Process