Cant upgrade from 5.1.70 to 5.2.1

Hi All,
Ok so im in need of some help, I am trying to migrate from 5.1.70 to 5.2.1 and I keep getting this error when i run php artisan migrate. I have fully updated with composer and have tried to migrate my invoice ninja to an Ubuntu server but failed with the same issue.

all help is appreciated

Migrating: 2013_11_05_180133_confide_setup_users_table

Illuminate\Database\QueryException

SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (SQL: drop table if exists accounts)

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:692
688▕ // If an exception occurs when attempting to run a query, we’ll format the error
689▕ // message to include the bindings with SQL, which will make this exception a
690▕ // lot more helpful to the developer instead of just the database’s errors.
691▕ catch (Exception $e) {
➜ 692▕ throw new QueryException(
693▕ $query, $this->prepareBindings($bindings), $e
694▕ );
695▕ }
696▕

  +12 vendor frames 

13 database/migrations/2013_11_05_180133_confide_setup_users_table.php:29
Illuminate\Support\Facades\Facade::__callStatic(“dropIfExists”)

  +21 vendor frames 

35 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

Im also getting a unix_socket error when i try to run php artisan db

@david any thoughts?

you’ll want to download this release https://github.com/invoiceninja/invoiceninja/archive/refs/tags/v5.2.1.zip

and overwrite all your files. the 5.1.70 tag went bad.

once the files are uploaded you can run

composer install --no-dev -o
php artisan migrate
php artisan optimize

ok that made some progress its migrating now and clearing optimize, but now when i try to log in i get 500: Server Error

and

AH01071: Got error ‘PHP message: PHP Fatal error: Declaration of Egulias\EmailValidator\Validation\MessageIDValidation::isValid(string $email, Egulias\EmailValidator\EmailLexer $emailLexer): bool must be compatible with Egulias\EmailValidator\Validation\EmailValidation::isValid($email, Egulias\EmailValidator\EmailLexer $emailLexer) in /var/www/vhosts/example.io/vendor/egulias/email-validator/src/Validation/MessageIDValidation.php on line 23’,

Haven’t seen that one before.

What version of PHP are you using?

you may also want to run

php artisan clear-compiled

1 Like

Thank You David!! That got it, I really appreciate all of you help and programming that you do!

and if still needed its PHP 7.4.2