Skip to content

Commit

Permalink
Merge branch 'd-stephane/8.x' into 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Oct 2, 2020
2 parents 9682853 + 7e71bdd commit fcf175b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Console/DumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function schemaState(Connection $connection)
*/
protected function path(Connection $connection)
{
return tap($this->option('path') ?: database_path('schema/'.$connection->getName().'-schema.sql'), function ($path) {
return tap($this->option('path') ?: database_path('schema/'.$connection->getName().'-schema.dump'), function ($path) {
(new Filesystem)->ensureDirectoryExists(dirname($path));
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,6 @@ protected function loadSchemaState()
*/
protected function schemaPath($connection)
{
return $this->option('schema-path') ?: database_path('schema/'.$connection->getName().'-schema.sql');
return $this->option('schema-path') ?: database_path('schema/'.$connection->getName().'-schema.dump');
}
}
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Schema/PostgresSchemaState.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected function appendMigrationData(string $path)
*/
public function load($path)
{
$process = $this->makeProcess('PGPASSWORD=$LARAVEL_LOAD_PASSWORD psql --file=$LARAVEL_LOAD_PATH --host=$LARAVEL_LOAD_HOST --port=$LARAVEL_LOAD_PORT --username=$LARAVEL_LOAD_USER --dbname=$LARAVEL_LOAD_DATABASE');
$process = $this->makeProcess('PGPASSWORD=$LARAVEL_LOAD_PASSWORD pg_restore --host=$LARAVEL_LOAD_HOST --port=$LARAVEL_LOAD_PORT --username=$LARAVEL_LOAD_USER --dbname=$LARAVEL_LOAD_DATABASE $LARAVEL_LOAD_PATH');

$process->mustRun(null, array_merge($this->baseVariables($this->connection->getConfig()), [
'LARAVEL_LOAD_PATH' => $path,
Expand All @@ -65,7 +65,7 @@ public function load($path)
*/
protected function baseDumpCommand()
{
return 'PGPASSWORD=$LARAVEL_LOAD_PASSWORD pg_dump --host=$LARAVEL_LOAD_HOST --port=$LARAVEL_LOAD_PORT --username=$LARAVEL_LOAD_USER $LARAVEL_LOAD_DATABASE';
return 'PGPASSWORD=$LARAVEL_LOAD_PASSWORD pg_dump -Fc --host=$LARAVEL_LOAD_HOST --port=$LARAVEL_LOAD_PORT --username=$LARAVEL_LOAD_USER $LARAVEL_LOAD_DATABASE';
}

/**
Expand Down

0 comments on commit fcf175b

Please sign in to comment.