Skip to content

Commit

Permalink
chore: Removed doctrine/dbal dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
LastDragon-ru committed Mar 15, 2024
1 parent 66e86e9 commit 27da03c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"ext-mbstring": "*",
"ext-xmlreader": "*",
"composer/semver": "^3.2",
"doctrine/dbal": "^3.1.4",
"doctrine/sql-formatter": "^1.1",
"guzzlehttp/psr7": "^1.9.1|^2.4.5",
"http-interop/http-factory-guzzle": "^1.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/migrator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
"lastdragon-ru/lara-asp-core": "self.version",
"symfony/filesystem": "^6.3.0",
"symfony/finder": "^6.3.0",
"symfony/polyfill-php83": "^1.28",
"doctrine/dbal": "^3.1.4"
"symfony/polyfill-php83": "^1.28"
},
"require-dev": {
"ext-pdo_sqlite": "*",
Expand Down
3 changes: 2 additions & 1 deletion packages/migrator/src/Extenders/SmartMigratorTest/down.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ INFO Rolling back migrations.
RawMigrationA ......................................................................................................
⇂ DROP TABLE IF EXISTS `migrator_raw_migration_a`;
RawDataMigrationA ..................................................................................................

⇂ select exists (select 1 from pragma_compile_options where compile_options = 'ENABLE_DBSTAT_VTAB') as enabled
⇂ select name from sqlite_master where type = 'table' and name not like 'sqlite_%' order by name
RawMigrationB ......................................................................................................
⇂ DROP TABLE IF EXISTS `migrator_raw_migration_b`;
2021_05_09_055650_anonymous ........................................................................................
Expand Down
3 changes: 2 additions & 1 deletion packages/migrator/src/Extenders/SmartMigratorTest/up.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ INFO Running migrations.
RawMigrationA ......................................................................................................
⇂ CREATE TABLE IF NOT EXISTS `migrator_raw_migration_a` ( `id` INT NOT NULL );
RawDataMigrationA ..................................................................................................

⇂ select exists (select 1 from pragma_compile_options where compile_options = 'ENABLE_DBSTAT_VTAB') as enabled
⇂ select name from sqlite_master where type = 'table' and name not like 'sqlite_%' order by name
RawMigrationB ......................................................................................................
⇂ CREATE TABLE IF NOT EXISTS `migrator_raw_migration_b` ( `id` INT NOT NULL );
3 changes: 2 additions & 1 deletion packages/migrator/src/Seeders/SeederService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Database\DatabaseManager;
use Illuminate\Database\Eloquent\Model;

use function array_column;
use function in_array;
use function is_string;

Expand All @@ -20,7 +21,7 @@ public function __construct() {
// =========================================================================
public function isSeeded(): bool {
$seeded = false;
$tables = $this->getConnection()->getDoctrineSchemaManager()->listTableNames();
$tables = array_column($this->getConnection()->getSchemaBuilder()->getTables(), 'name');
$skipped = [
Container::getInstance()->make(Repository::class)->get('database.migrations'),
];
Expand Down
1 change: 0 additions & 1 deletion packages/testing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"ext-xmlreader": "*",
"ext-mbstring": "*",
"composer/semver": "^3.2",
"doctrine/dbal": "^3.1.4",
"doctrine/sql-formatter": "^1.1",
"http-interop/http-factory-guzzle": "^1.0.0",
"laravel/framework": "^10.34.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/src/Database/RefreshDatabaseIfEmpty.php