kimai / kimai

Kimai is a web-based multi-user time-tracking application. Works great for everyone: freelancers, companies, organizations - everyone can track their times, generate reports, create invoices and do so much more. SaaS version available at https://www.kimai.cloud
https://www.kimai.org
GNU Affero General Public License v3.0
3.01k stars 529 forks source link

Missing database-table kimai2_configuration while trying to run import/migration script #698

Closed typoworx-de closed 5 years ago

typoworx-de commented 5 years ago

Describe the bug I've been trying to install kimai2 and run migration from kimai1. Followed the instructions on:

To Reproduce After git clone and chown/chmod stuff (as described in installation-steps)

$> bin/console doctrine:database:create
$> bin/console doctrine:schema:create
$> bin/console doctrine:migrations:version --add --all

The error occurs after this command:

$> bin/console kimai:import-v1 "mysql://kimai:*********@127.0.0.1:3306/intranet_kimai?charset=utf8" "" "**********" "DE" "EUR"

Note: on Kimai v1 I disabled db-prefix, thats why it's left empty using empty quotes above.

The error:

ERROR     [console] Error thrown while running command "kimai:import-v1 'mysql://kimai:*******************@127.0.0.1:3306/intranet_kimai?charset=utf8' kimai2_ ******************* DE EUR". Message: "An exception occurred while executing 'SELECT value FROM `kimai2_configuration` WHERE `option` = ?' with params ["version"]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'intranet_kimai.kimai2_configuration' doesn't exist" ["exception" => Doctrine\DBAL\Exception\TableNotFoundException { …},"command" => "kimai:import-v1 'mysql://kimai:**********************@127.0.0.1:3306/intranet_kimai?charset=utf8' kimai2_ ******************** DE EUR","message" => """  An exception occurred while executing 'SELECT value FROM `kimai2_configuration` WHERE `option` = ?' with params ["version"]:\n  \n  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'intranet_kimai.kimai2_configuration' doesn't exist  """]

In AbstractMySQLDriver.php line 42:
  An exception occurred while executing 'SELECT value FROM `kimai2_configuration` WHERE `option` = ?' with params ["version"]:  

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'intranet_kimai.kimai2_configuration' doesn't exist                                                                                                

In PDOStatement.php line 119:                                                                                                                 
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'intranet_kimai.kimai2_configuration' doesn't exist  

In PDOStatement.php line 117:                                                                                                                 
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'intranet_kimai.kimai2_configuration' doesn't exist  

kimai:import-v1 [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> <connection> <prefix> <password> [<country> [<currency>]]

For any reason the database-table/schema 'kimai2_configuration' is not created and misssing now!

Additional context Add any other context about the problem here.

It looks like a duplicate/related to #428 which already should have been fixed (https://github.com/kevinpapst/kimai2/pull/429). But obvously it is not!

typoworx-de commented 5 years ago

My fault. Tried again with empty db-prefix argument (as shown in this ticket) and got it running now. Must have been using "kimai2_" there believing it was for the target version.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. If you use Kimai on a daily basis, please consider donating to support further development of Kimai.