mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 09:53:35 +02:00
Do not try to reset autoincrement of sqlite test DB as this somehow cause trouble with loading fixtures...
This commit is contained in:
parent
225da163bb
commit
5a1fa409d8
1 changed files with 4 additions and 3 deletions
|
@ -189,7 +189,7 @@ class ResetAutoIncrementORMPurger implements PurgerInterface, ORMPurgerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
//Reseting autoincrement is only supported on MySQL platforms
|
//Reseting autoincrement is only supported on MySQL platforms
|
||||||
if ($platform instanceof AbstractMySQLPlatform || $platform instanceof SqlitePlatform) {
|
if ($platform instanceof AbstractMySQLPlatform ) { //|| $platform instanceof SqlitePlatform) {
|
||||||
$connection->beginTransaction();
|
$connection->beginTransaction();
|
||||||
$connection->executeQuery($this->getResetAutoIncrementSQL($tbl, $platform));
|
$connection->executeQuery($this->getResetAutoIncrementSQL($tbl, $platform));
|
||||||
}
|
}
|
||||||
|
@ -209,9 +209,10 @@ class ResetAutoIncrementORMPurger implements PurgerInterface, ORMPurgerInterface
|
||||||
return 'ALTER TABLE '.$tableIdentifier->getQuotedName($platform).' AUTO_INCREMENT = 1;';
|
return 'ALTER TABLE '.$tableIdentifier->getQuotedName($platform).' AUTO_INCREMENT = 1;';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($platform instanceof SqlitePlatform) {
|
//This seems to cause problems somehow
|
||||||
|
/*if ($platform instanceof SqlitePlatform) {
|
||||||
return 'DELETE FROM `sqlite_sequence` WHERE name = \''.$tableIdentifier->getQuotedName($platform).'\';';
|
return 'DELETE FROM `sqlite_sequence` WHERE name = \''.$tableIdentifier->getQuotedName($platform).'\';';
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue