Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DB version checker #140

Open
llaville opened this issue Nov 6, 2024 · 2 comments
Open

DB version checker #140

llaville opened this issue Nov 6, 2024 · 2 comments
Assignees

Comments

@llaville
Copy link
Owner

llaville commented Nov 6, 2024

New Feature request

Summary

Detect and alert if DB installed version is not the same as one embedded

Description

Related to discussion llaville/php-compatinfo#377

@llaville llaville self-assigned this Nov 6, 2024
@llaville
Copy link
Owner Author

llaville commented Nov 8, 2024

Will migrate first :

  • from doctrine/orm v2 to v3
  • from doctrine/dbal v3 to v4

See commit c68a0d8

@llaville
Copy link
Owner Author

With a previous installation (6.13.x-dev@0092738) of bartlett/php-compatinfo-db, I've updated it to new version (6.13.x-dev@17d3938)

But when a run the diagnose command, I get :


Requirements Checker
====================

 > Running PHP CompatInfo with PHP 8.1.30 on Linux 5.15.153.1-microsoft-standard-WSL2
 > PHP is using the following php.ini file:
   WARNING: No configuration file (php.ini) used by PHP!

 > Checking PHP CompatInfo requirements:
   [x] PHP version must be at least 8.1.0
   [x] sqlite3 extension must be available
   [x] Check if source "/home/devilbox/.cache/bartlett/prod/compatinfo-db.sqlite" can be reached

   [ ] Check if tables exists in database
   [ ] Check if database contains at least one distribution platform

 ? Environment

 ? Parameters
    >  [kernel.environment] prod
    >  [kernel.debug]
    >  [kernel.home_dir] /home/devilbox
    >  [kernel.project_dir] /shared/backups/bartlett/php-compatinfo
    >  [kernel.cache_dir] /home/devilbox/.cache/bartlett/prod
    >  [kernel.build_dir] /home/devilbox/.cache/bartlett/prod
    >  [kernel.logs_dir] /home/devilbox/.cache/bartlett/prod
    >  [kernel.vendor_dir] /shared/backups/bartlett/php-compatinfo/vendor
    >  [kernel.container_class] Bartlett_CompatInfo_Application_Kernel_ConsoleKernelProdContainer
    >  [compat_info_db.version] 6.13.x-dev@0092738
    >  [compat_info_db.proxy_dir] /home/devilbox/.cache/bartlett/prod/php-compatinfo-db/6.13.x-dev@0092738/proxies


 [ERROR] Your system is not ready to run the application.


Fix the following mandatory requirements (in sequential order):
---------------------------------------------------------------

   * Create the schema with "db:create" command.
   * At least one distribution platform should exist. None available. Run "db:init" command to build one.

 ! [NOTE] phpCompatInfo version 7.2.x-dev@ff0d3c4 DB version 6.13.x-dev@17d3938
 

This lead to proxy generation in wrong place !

Removing > [kernel.container_class] Bartlett_CompatInfo_Application_Kernel_ConsoleKernelProdContainer entry into > [kernel.cache_dir] /home/devilbox/.cache/bartlett/prod seems to solve the solution.

Need more tests before a patch !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant