mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Use Laravel schema migration command directly (#14039)
* Add new schema migration command * Apply fixes from StyleCI
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user