Skip to content

Commit

Permalink
test: test_skip_duplicated_backups
Browse files Browse the repository at this point in the history
  • Loading branch information
WatheqAlshowaiter committed Aug 24, 2024
1 parent a51adb7 commit 31f997e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/BackupTablesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,11 @@ public function test_skip_duplicated_backups()
$pattern = "{$tableName}_backup_%";
$databaseDriver = DB::getDriverName();
$count = 0;

switch ($databaseDriver) {
case 'mysql':
$result = DB::select("
case 'mariadb':
$result = DB::select(/**@lang MySQL*/"
SELECT COUNT(*) as count
FROM information_schema.tables
WHERE table_schema = DATABASE()
Expand All @@ -287,7 +289,7 @@ public function test_skip_duplicated_backups()
break;

case 'pgsql':
$result = DB::select("
$result = DB::select(/**@lang PostgreSQL*/"
SELECT COUNT(*) as count
FROM information_schema.tables
WHERE table_schema = 'public'
Expand All @@ -303,7 +305,7 @@ public function test_skip_duplicated_backups()
break;

case 'sqlsrv':
$result = DB::select("
$result = DB::select(/**@lang TSQL*/"
SELECT COUNT(*) as count
FROM sys.tables
WHERE name LIKE ?", [$pattern]);
Expand Down

0 comments on commit 31f997e

Please sign in to comment.