Use Laravel schema migration command directly (#14039)

* Add new schema migration command

* Apply fixes from StyleCI
This commit is contained in:
Jellyfrog
2023-08-04 02:26:48 +02:00
committed by GitHub
parent d4baa34b87
commit 5a56e9081e
300 changed files with 58 additions and 1514 deletions

View File

@@ -51,13 +51,7 @@ class DBSetupTest extends DBTestCase
$this->assertSame(0, $result, 'Errors loading DB Schema: ' . Artisan::output());
}
public function testSchemaFiles(): void
{
$files = glob(base_path('/sql-schema/*.sql'));
$this->assertCount(282, $files, 'You should not create new legacy schema files.');
}
public function testSchema(): void
public function testSchema()
{
$files = array_map(function ($migration_file) {
return basename($migration_file, '.php');
@@ -66,12 +60,6 @@ class DBSetupTest extends DBTestCase
sort($files);
sort($migrated);
$this->assertEquals($files, $migrated, 'List of run migrations did not match existing migration files.');
// check legacy schema version is 1000
$schema = DB::connection($this->connection)->table('dbSchema')
->orderBy('version', 'DESC')
->value('version');
$this->assertEquals(1000, $schema, 'Seed not run, after seed legacy dbSchema should be 1000');
}
public function testCheckDBCollation(): void