Class [db.schema] does not exist

Upon cloning the repo, running composer install and generating optimized autoload files I am now facing this error for a long time, which always show : Class “db.schema” does not exist pointing out to In Container.php line 891. Have tried to delete the vendor directory, composer.lock and do composer install but the eroor is still shown


It may help to run sudo apt install php-mysql

@hillel thanks but still nothing, any command I try on my cmd always gives me that error. It seems there are some executions which are happening probably in providers or somewhere else before my actual command gets executed

Can you check if the php-mysql extension is enabled?

@hillel yes it’s enabled in xampp.

I’m not sure if that’s the same, you may want to setup a phpinfo page to confirm.

Confirmed. Even this code is confirming it:

if (extension_loaded('mysqli')) {
    echo 'MySQLi extension is enabled.';
} else {
    echo 'MySQLi extension is not enabled.';

What version do you see if you run php -v

Am running PHP 8.2.4

I think the problem is likely due to server configuration.

Maybe this will help:

Got it working by creating a new project of Laravel 9.3. Copied the composer.json from invoiceninja did composer update. Then later copied other files from invoiceninja and throwed them in my new project. All the setup is done. Now after running the migrations and seeding the database and running php artisan serve the system seems to be in an infinity loading until it is time out. Is this something you have encountered before @hillel

Are there any errors in storage/logs or the web server error logs?

@david may have some suggestions.

Yes It seems the app\\Utils\\SystemHealth.php:141 was taking a lot of time to loop through the files. Thanks for help and nice software indeed. Just one last more is the mysql-schema.dump up to date. Each time I try update my company am having errors like Unknown column 'invoice_task_item_description' in 'field list' (SQL: update companies..... and when adding a client am getting this error : Column not found: 1054 Unknown column 'routing_id' in 'field list' (SQL: insert into clients (company_id...........

It may help to run php artisan migrate

1 Like