PostgresSchemaState

class PostgresSchemaState extends SchemaState (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 $files = null, callable $processFactory = null)

Create a new dumper instance.

from SchemaState
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(array ...$arguments)

Create a new process instance.

from SchemaState
$this withMigrationTable(string $table)

Specify the name of the application's migration table.

from SchemaState
$this handleOutputUsing(callable $output)

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

from SchemaState
string baseDumpCommand()

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

array baseVariables(array $config)

Get the base variables for a dump / load command.

Details

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

Create a new dumper instance.

Parameters

Connection $connection
Filesystem $files
callable $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(array ...$arguments)

Create a new process instance.

Parameters

array ...$arguments

Return Value

Process

$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 string baseDumpCommand()

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

Return Value

string

protected array baseVariables(array $config)

Get the base variables for a dump / load command.

Parameters

array $config

Return Value

array

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Database/Schema/PostgresSchemaState.html