dexterity42 / SharedProjectTimesheetsBundle

Shared Project Timesheets Bundle - Kimai 2 Plugin
MIT License
9 stars 14 forks source link

[ERROR] Failed to install SharedProjectTimesheetsBundle database: Migrations configuration key "name" does not exist. #19

Open mathias4github opened 2 years ago

mathias4github commented 2 years ago

Hi, with the latest update to 1.15.1 (stable) the install of the plugin is not working anymore:

`bash-5.1$ git clone https://github.com/dexterity42/SharedProjectTimesheetsBundle.git Cloning into 'SharedProjectTimesheetsBundle'... remote: Enumerating objects: 196, done. remote: Counting objects: 100% (196/196), done. remote: Compressing objects: 100% (128/128), done. remote: Total 196 (delta 83), reused 172 (delta 62), pack-reused 0 Receiving objects: 100% (196/196), 53.58 KiB | 2.06 MiB/s, done. Resolving deltas: 100% (83/83), done. bash-5.1$ ls -ltr total 4 drwxr-xr-x 15 www-data www-data 4096 Sep 24 19:15 SharedProjectTimesheetsBundle bash-5.1$ cd /opt/kimai/ bash-5.1$ bin/console cache:clear

// Clearing the cache for the prod environment with debug false

[OK] Cache for the "prod" environment (debug=false) was successfully cleared.

bash-5.1$ bin/console cache:warmup

// Warming up the cache for the prod environment with debug false

[OK] Cache for the "prod" environment (debug=false) was successfully warmed.

bash-5.1$ bin/console Kimai 1.15.1 (env: prod, debug: false)

Usage: command [options] [arguments]

Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question -e, --env=ENV The Environment name. [default: "prod"] --no-debug Switches off debug mode. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands: about Display information about the current project help Display help for a command list List commands assets assets:install Install bundle's web assets under a public directory cache cache:clear Clear the cache cache:pool:clear Clear cache pools cache:pool:delete Delete an item from a cache pool cache:pool:list List available cache pools cache:pool:prune Prune cache pools cache:warmup Warm up an empty cache config config:dump-reference Dump the default configuration for an extension dbal dbal:run-sql Executes arbitrary SQL directly from the command line. debug debug:autowiring List classes/interfaces you can use for autowiring debug:config Dump the current configuration for an extension debug:container Display current services for an application debug:event-dispatcher Display configured listeners for an application debug:form Display form type information debug:router Display current routes for an application debug:translation Display translation messages information debug:twig Show a list of twig functions, filters, globals and tests doctrine doctrine:cache:clear-collection-region Clear a second-level cache collection region doctrine:cache:clear-entity-region Clear a second-level cache entity region doctrine:cache:clear-metadata Clears all metadata cache for an entity manager doctrine:cache:clear-query Clears all query cache for an entity manager doctrine:cache:clear-query-region Clear a second-level cache query region doctrine:cache:clear-result Clears result cache for an entity manager doctrine:database:create Creates the configured database doctrine:database:drop Drops the configured database doctrine:database:import Import SQL file(s) directly to Database. doctrine:ensure-production-settings Verify that Doctrine is properly configured for a production environment doctrine:mapping:convert [orm:convert:mapping] Convert mapping information between supported formats doctrine:mapping:import Imports mapping information from an existing database doctrine:mapping:info
doctrine:migrations:current [current] Outputs the current version doctrine:migrations:diff [diff] Generate a migration by comparing your current database to your mapping information. doctrine:migrations:dump-schema [dump-schema] Dump the schema for your database to a migration. doctrine:migrations:execute [execute] Execute one or more migration versions up or down manually. doctrine:migrations:generate [generate] Generate a blank migration class. doctrine:migrations:latest [latest] Outputs the latest version doctrine:migrations:list [list-migrations] Display a list of all available migrations and their status. doctrine:migrations:migrate [migrate] Execute a migration to a specified version or the latest available version. doctrine:migrations:rollup [rollup] Rollup migrations by deleting all tracked versions and insert the one version that exists. doctrine:migrations:status [status] View the status of a set of migrations. doctrine:migrations:sync-metadata-storage [sync-metadata-storage] Ensures that the metadata storage is at the latest version. doctrine:migrations:up-to-date [up-to-date] Tells you if your schema is up-to-date. doctrine:migrations:version [version] Manually add and delete migration versions from the version table. doctrine:query:dql Executes arbitrary DQL directly from the command line doctrine:query:sql Executes arbitrary SQL directly from the command line. doctrine:schema:create Executes (or dumps) the SQL needed to generate the database schema doctrine:schema:drop Executes (or dumps) the SQL needed to drop the current database schema doctrine:schema:update Executes (or dumps) the SQL needed to update the database schema to match the current mapping metadata doctrine:schema:validate Validate the mapping files kimai kimai:bundle:shared-project-timesheets:install Install bundle/plugin shared-project-timesheets kimai:import:customer Import customer from CSV file kimai:import:project Import projects from CSV file kimai:import:timesheet Import timesheets from CSV file kimai:import:v1 [kimai:import-v1] Import data from a Kimai v1 installation kimai:install Basic installation for Kimai kimai:invoice:create Create invoices kimai:plugins Receive plugin information kimai:reload Reload Kimai caches kimai:update Update your Kimai installation kimai:user:activate [fos:user:activate] Activate a user kimai:user:create [kimai:create-user] Create a new user kimai:user:deactivate [fos:user:deactivate] Deactivate a user kimai:user:demote [fos:user:demote] Demote a user by removing a role kimai:user:password [fos:user:change-password] Change the password of a user. kimai:user:promote [fos:user:promote] Promotes a user by adding a role kimai:version Receive version information lint lint:container Ensure that arguments injected into services match type declarations lint:twig Lint a template and outputs encountered errors lint:xliff Lint an XLIFF file and outputs encountered errors lint:yaml Lint a file and outputs encountered errors router router:match Help debug routes by simulating a path info match secrets secrets:decrypt-to-local Decrypt all secrets and stores them in the local vault. secrets:encrypt-from-local Encrypt all local secrets to the vault. secrets:generate-keys Generate new encryption keys. secrets:list List all secrets. secrets:remove Remove a secret from the vault. secrets:set Set a secret in the vault. security security:encode-password Encode a password. translation translation:update Update the translation file bash-5.1$ bin/console kimai:bundle:shared-project-timesheets:install

[ERROR] Failed to install SharedProjectTimesheetsBundle database: Migrations configuration key "name" does not exist.

bash-5.1$ `

ghost commented 2 years ago

I can confirm same thing happening on a fresh install. We have one old installation that we upgraded without issues.

prasad-annamdasu commented 2 years ago

pening on a fresh install. We have one old installation that we upgraded without issues.

Hi, Could you please confirm on the previous version ?

dexterity42 commented 2 years ago

Hi, this should be fixed with release 2.0.0 as it contains a new configuration for the doctrine / db migration dependency that has been upgraded in Kimai v15.

Please let me know if the problem is fixed for you - thanks in advance!

ghost commented 2 years ago

Hi, thank you for follow up on this.

I've downloaded v2.0.1 from tags, and have run the following

bin/console cache:clear bin/console cache:warmup

followed by the bin/console kimai:bundle:shared-project-timesheets:install

However error is still here:

[ERROR] Failed to install SharedProjectTimesheetsBundle database: Migrations configuration key "name" does not exist.

dexterity42 commented 2 years ago

@modulec I would expect that the bin/console cache:clear command is sufficient to reload the migration configuration file. The new configuration file does not contain the configuration key "name" anymore, it only contains the "migrations_paths" key.

Please provide some more information to reproduce the error:

ghost commented 2 years ago

Ah.. ok, that would explain it, I'm still on 1.15.6 haven't seen the update to 1.16 yet. This was a fresh install of 2.0.1 plugin Will try to update kimai first and then install the plugin again.

dexterity42 commented 2 years ago

I tried to install the plugin version 2.0.1 with a fresh Kimai v1.15.6 and the installation succeeded. In addition i tried to install the plugin version 2.0.1 with a fresh Kimai v1.14.3 the installation fails as expected (version 2.0.1 of the plugin is only compatible with Kimai 1.15+).

Let me hear if your upgrade to 1.16 helped to resolve the problem for you. Otherwise something else might be the reason for the installation problems.

dexterity42 commented 2 years ago

There was another migration configuration issue. If you're on plugin version 1.0.0 please upgrade to version 2.1.0 directly, otherwise the wrong migration information table could be used.

If there are any other issues while migrating, please let me know.

ghost commented 2 years ago

@dexterity42 I've updated Kimai to 1.16.6 and used new plugin version 2.1.0 and I'm happy to report that installation is now working as expected. Thank you for the update and support!

prasad-annamdasu commented 2 years ago

@dexterity42 I've updated Kimai to 1.16.6 and used new plugin version 2.1.0 and I'm happy to report that installation is now working as expected. Thank you for the update and support!

Its working now. Thank you.