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
Create a new dumper instance.
Load the given schema file into the database.
Determine if the current connection has a migration table.
Get the name of the application's migration table.
Specify the name of the application's migration table.
Specify the callback that should be used to handle process output.
Get the base dump command arguments for PostgreSQL as a string.
Get the base variables for a dump / load command.
Details
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.
protected 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.
protected string
baseDumpCommand()
Get the base dump command arguments for PostgreSQL as a string.
protected array
baseVariables(array $config)
Get the base variables for a dump / load command.