diff --git a/src/Database/Connections/MySqlConnection.php b/src/Database/Connections/MySqlConnection.php index 2458a9ee6..1820fa422 100644 --- a/src/Database/Connections/MySqlConnection.php +++ b/src/Database/Connections/MySqlConnection.php @@ -1,5 +1,7 @@ getPdo()->getAttribute(PDO::ATTR_SERVER_VERSION), 'MariaDB'); + } + + /** + * Get the schema state for the connection. + * + * @param \Illuminate\Filesystem\Filesystem|null $files + * @param callable|null $processFactory + * @return \Illuminate\Database\Schema\MySqlSchemaState + */ + public function getSchemaState(?Filesystem $files = null, ?callable $processFactory = null) + { + return new MySqlSchemaState($this, $files, $processFactory); + } } diff --git a/src/Database/Connections/PostgresConnection.php b/src/Database/Connections/PostgresConnection.php index d768d69e4..d71732d96 100644 --- a/src/Database/Connections/PostgresConnection.php +++ b/src/Database/Connections/PostgresConnection.php @@ -3,6 +3,8 @@ use Illuminate\Database\Schema\PostgresBuilder; use Illuminate\Database\PDO\PostgresDriver; use Illuminate\Database\Query\Processors\PostgresProcessor; +use Illuminate\Database\Schema\PostgresSchemaState; +use Illuminate\Filesystem\Filesystem; use Winter\Storm\Database\Query\Grammars\PostgresGrammar as QueryGrammar; use Illuminate\Database\Schema\Grammars\PostgresGrammar as SchemaGrammar; @@ -64,4 +66,16 @@ protected function getDoctrineDriver() { return new PostgresDriver; } + + /** + * Get the schema state for the connection. + * + * @param \Illuminate\Filesystem\Filesystem|null $files + * @param callable|null $processFactory + * @return \Illuminate\Database\Schema\PostgresSchemaState + */ + public function getSchemaState(?Filesystem $files = null, ?callable $processFactory = null) + { + return new PostgresSchemaState($this, $files, $processFactory); + } } diff --git a/src/Database/Connections/SQLiteConnection.php b/src/Database/Connections/SQLiteConnection.php index 1d6e3db1e..3ab2d7cdd 100644 --- a/src/Database/Connections/SQLiteConnection.php +++ b/src/Database/Connections/SQLiteConnection.php @@ -3,6 +3,8 @@ use Illuminate\Database\Schema\SQLiteBuilder; use Illuminate\Database\Query\Processors\SQLiteProcessor; use Illuminate\Database\PDO\SQLiteDriver; +use Illuminate\Database\Schema\SqliteSchemaState; +use Illuminate\Filesystem\Filesystem; use Winter\Storm\Database\Query\Grammars\SQLiteGrammar as QueryGrammar; use Illuminate\Database\Schema\Grammars\SQLiteGrammar as SchemaGrammar; @@ -64,4 +66,17 @@ protected function getDoctrineDriver() { return new SQLiteDriver; } + + /** + * Get the schema state for the connection. + * + * @param \Illuminate\Filesystem\Filesystem|null $files + * @param callable|null $processFactory + * + * @throws \RuntimeException + */ + public function getSchemaState(?Filesystem $files = null, ?callable $processFactory = null) + { + return new SqliteSchemaState($this, $files, $processFactory); + } } diff --git a/src/Database/Connections/SqlServerConnection.php b/src/Database/Connections/SqlServerConnection.php index 07a6af21a..72cc16f36 100644 --- a/src/Database/Connections/SqlServerConnection.php +++ b/src/Database/Connections/SqlServerConnection.php @@ -1,12 +1,16 @@ - \Illuminate\Console\Scheduling\ScheduleRunCommand::class, 'ScheduleTest' => \Illuminate\Console\Scheduling\ScheduleTestCommand::class, 'ScheduleWork' => \Illuminate\Console\Scheduling\ScheduleWorkCommand::class, + 'SchemaDump' => \Illuminate\Database\Console\DumpCommand::class, 'Up' => \Illuminate\Foundation\Console\UpCommand::class, 'ViewClear' => \Illuminate\Foundation\Console\ViewClearCommand::class, @@ -58,7 +59,6 @@ class ArtisanServiceProvider extends ArtisanServiceProviderBase // 'DbWipe' => WipeCommand::class, // 'OptimizeClear' => OptimizeClearCommand::class, // 'QueueClear' => QueueClearCommand::class, - // 'SchemaDump' => DumpCommand::class, // 'ScheduleClearCache' => ScheduleClearCacheCommand::class, // 'ViewCache' => ViewCacheCommand::class,