Hi, I have installed v5 under a separate subdomain on my Centos7 server which is running cPanel/whm. Everything seems to work ok, when I try to run the migration from v4 I can enter the new installation URL and credentials, all looks well. The message appears; “Migration has started. We’ll update you with status, on your company e-mail.” This seems encouraging…
…But then nothing else happens. The database is never updated for the v5 site. I can see POST and GET entries on the v5 site in storage/logs/laravel.log indicating that the login information was verified and the company info for migration retrieved, but that is all.
It looks that there is a zip file created on the v4 site in storage/migrations which holds a .json file containing migration information.
I can see this message from the v4 site in storage/logs/laravel-error.log:
[2020-12-03 02:52:36] production.ERROR: ErrorException [0] : /home/(user)/invoiceninja/storage/framework/views/f58e5b10961980c5fcf70adb60d1e34ab621ae7f.php [Line 4] => Array to string conversion (View: /home/(user)/invoiceninja/resources/views/migration/includes/errors.blade.php) (View: /home/(user)/invoiceninja/resources/views/migration/includes/errors.blade.php) {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:"(my name)",“method”:“GET”,“user_agent”:“Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.106 Safari/537.36”,“locale”:“en”,“ip”:"(my-ip-address)"(",“count”:2,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“migration/auth”} []
I can’t seem to find any other helpful error messages anywhere, what to do?
I’m running 4.5.21 White labeled, and 5.0.31-27. Upgraded my php to 7.4. Both v4 and v5 instances seem to be running ok, it’s just that the migration won’t complete.
Today I ran the ‘Force Update’ option on v5 from the gui and now it says the version is 5.0.32-27
and the following showed up in the laravel.log:
[2020-12-06 01:19:47] production.INFO: Are there changes to pull?
[2020-12-06 01:19:49] production.INFO: Are there any changes to pull?
[2020-12-06 01:19:49] production.INFO: running post update
[2020-12-06 01:20:26] production.INFO: Are there changes to pull? 1
[2020-12-06 01:20:27] production.INFO: Are there any changes to pull? 1
[2020-12-06 01:20:27] production.INFO: running post update
Then after that I tried the migration from v4 once again.
As before, when running the migration I check ‘self-hosted’, then enter the url of the v5 installation, then the authentication info. The company info appears on the screen, I tick both boxes, and after submission I get the success message: “Migration has started. We’ll update you with status, on your company e-mail.”
–Still no results on the v5 installation.
No new entries appear in either log–
v5: storage/logs/laravel.log or
v4: storage/logs/laravel-error.log
However, in poking around I do again find a new zip file, named: hhh3skpv99c2cgwkxoicn59tnmr9zha3-2020-12-06-invoiceninja.zip
with the current date, created by v4 in its storage/migrations directory.
Uncompressing that zip file reveals the file: migration.json
which appears to contain the data to be migrated. (?)
Any other suggestions? Your assistance is much appreciated
The migration info seems to exist in the v4 files, but not on v5. When I run
php artisan migrations:import
I get the following:
In ImportMigrations.php line 83:
DirectoryIterator::__construct(/home/east/billing/invoiceninja/public/storage/migrations/import): failed to open dir: No such file or directory
Would it be possible to manually move the migration information from the v4 installation to v5? What steps would I need to take?
I tried moving the contents of
v4 storage/migration
to
v5 storage/public/migration/import
Then when I ran
php migratiosn:import
Started processing: hhh3skpv99c2cgwkxoicn59tnmr9zha3-2020-12-06-invoiceninja.zip at 2020-12-06 17:00:58
However, I still get no love. The following now appears in v5
storage/logs/laravel.log
@nemestrinus instead of running php artisan migrations:import you may want to try a regular migration again. Instead this time, in your V5 installation change the line in your .env file QUEUE_CONNECTION to QUEUE_CONNECTION=sync
Once done, just rebuild the cache with php artisan optimize and then attempt the migrartion again from V4.
Thanks, I tried that, but still get the same result. A new zip file containing migration.json is created in the v4 installation under storage/migrations but nothing at all happens on the v5 installation.