Files
kimai2/UPGRADING.md
Kevin Papst 53f82a808b improved invoices with new renderer (#306)
* added docx renderer and demo template
* added csv renderer and demo template
* added xlsx renderer and demo template
* added ods renderer and demo template
* added user calculator
* added invoice documentation
2018-09-21 01:27:56 +02:00

2.9 KiB

Upgrading Kimai 2

Database upgrades are currently ONLY provided for MySQL/MariaDB and SQLite.

If you plan on using e.g. PostgreSQL, please read more about the bin/console doctrine:migrations:diff and bin/console doctrine:migrations:migrate commands and contact us, so we can integrate them into the official releases.

A normal upgrade can be executed with these commands:

git pull origin master
sudo -u www-data composer install --no-dev --optimize-autoloader
sudo -u www-data bin/console cache:clear --env=prod
sudo -u www-data bin/console cache:warmup --env=prod
bin/console doctrine:migrations:migrate

There might be version specific tasks that need to be executed before or after these steps, please see below if your updated version is mentioned below.

0.5 (unreleased)

Some configuration nodes were removed, if you have one of them in your local.yaml you need to delete them:

  • kimai.invoice.calculator
  • kimai.invoice.renderer
  • kimai.invoice.number_generator

The new config kimai.invoice.documents was introduced, holding a list of directories (read more).

0.4 (2018-09-01)

In the time between 0.3 and 0.4 there was a release of composer that introduced a BC break, which leads to problems between Composer and Symfony Flex, resulting in an error like this when running it:

  [ErrorException]
  Declaration of Symfony\Flex\ParallelDownloader::getRemoteContents($originUrl, $fileUrl, $context) should be compatible with Composer\Util\RemoteFilesystem::getRemoteContents($originUrl, $fileUrl, $context, ?array &$responseHeaders = NULL)

This can be fixed by updating Composer and Flex before executing the Kimai update:

sudo composer self-update
sudo -u www-data composer update symfony/flex --no-plugins --no-scripts

Then the full update can be executed as usual:

git pull origin master
sudo -u www-data composer install --no-dev --optimize-autoloader
sudo -u www-data bin/console cache:clear --env=prod
sudo -u www-data bin/console cache:warmup --env=prod
bin/console doctrine:migrations:migrate

0.3 (2018-07-22)

Update from 0.2:

You need to adjust your .env file and add your from address for all emails generated by Kimai 2:

MAILER_FROM=kimai@example.com

Create a file and database backup before executing the following steps:

git pull origin master
sudo -u www-data composer install --no-dev --optimize-autoloader
sudo -u www-data bin/console cache:clear --env=prod
sudo -u www-data bin/console cache:warmup --env=prod
bin/console doctrine:migrations:version --add 20180701120000
bin/console doctrine:migrations:migrate