fix migration for sqlite users (#985)

This commit is contained in:
Kevin Papst
2019-07-25 18:00:53 +02:00
committed by GitHub
parent 12803b3957
commit 00925d38aa
2 changed files with 22 additions and 0 deletions

View File

@@ -26,6 +26,21 @@ final class Version20190706224219 extends AbstractMigration
return 'Creates several indices to improve speed for default queries.';
}
protected function isSupportingForeignKeys(): bool
{
return false;
}
public function isTransactional(): bool
{
if ($this->isPlatformSqlite()) {
// does fail if we use transactions, as tables are re-created and foreign keys would fail
return false;
}
return true;
}
public function up(Schema $schema): void
{
$timesheet = $schema->getTable('kimai2_timesheet');