Release 1.6.1 (#1282)
This commit is contained in:
@@ -42,7 +42,8 @@ class ImportTimesheetCommand extends Command
|
||||
{
|
||||
protected static $defaultName = 'kimai:import:timesheet';
|
||||
|
||||
public const DEFAULT_BEGIN = '00:00';
|
||||
// if we use 00:00 we might run into summer/winter time problems which happen between 02:00 and 03:00
|
||||
public const DEFAULT_BEGIN = '04:00';
|
||||
public const DEFAULT_CUSTOMER = 'Imported customer - %s';
|
||||
|
||||
private static $supportedHeader = [
|
||||
|
||||
@@ -136,12 +136,6 @@ final class InstallCommand extends Command
|
||||
|
||||
protected function createDatabase(SymfonyStyle $io, InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
if (!$this->connection->isConnected() && !$this->connection->connect()) {
|
||||
throw new \Exception(
|
||||
sprintf('Database connection could not be established: %s', $this->connection->getDatabase())
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->connection->isConnected()) {
|
||||
$io->note(sprintf('Database is existing and connection could be established'));
|
||||
|
||||
@@ -153,7 +147,11 @@ final class InstallCommand extends Command
|
||||
}
|
||||
|
||||
$command = $this->getApplication()->find('doctrine:database:create');
|
||||
$command->run(new ArrayInput([]), $output);
|
||||
$result = $command->run(new ArrayInput(['--if-not-exists' => true]), $output);
|
||||
|
||||
if (0 !== $result) {
|
||||
throw new \Exception('Failed creating database. Check your credentials in DATABASE_URL');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user