RealWorldDev liked a comment+100 XP
3mos ago
@realworlddev Going forward, never run the optimize or any caching commands outside of your production environment. Laravel did add a Composer command to clear the cache and run tests a few months ago, but it shouldn’t be needed as you shouldn’t be caching your configuration locally in the first place.
RealWorldDev wrote a reply+100 XP
3mos ago
RealWorldDev liked a comment+100 XP
3mos ago
RealWorldDev wrote a reply+100 XP
3mos ago
RealWorldDev wrote a reply+100 XP
3mos ago
It's a mysql database and has been for the last 3 years. I ran the upgrade on the staging environment (hosted on AWS and uses Forge and I did plenty of backups before doing it!) and it all worked as expected.
The only thing that's different from all updates I've done previously is that I'm now using Laravel Herd for local development. I'm not saying it's something Herd is doing but when I compare from previous updates, that's the only difference. I do have another project that needs updating so I'll see how that behaves.
RealWorldDev wrote a reply+100 XP
3mos ago
Thanks for the swift reply Martin.
I only ran one command as part of the upgrade which was 'composer update'. I had gone through the composer.json file changing version numbers that I needed to change that were listed in the official update guide, then ran the command. Everything seemed to work fine.
I use Laravel Herd to run everything locally so no Docker image. I've gone back through everything that was output to the terminal and there is nothing there out of the ordinary.
The only post-update-cmd in the composer file is '@php artisan vendor:publish --tag=laravel-assets --ansi --force' which resulted in 'No publishable resources for tag [laravel-assets].' being output but that's just standard. I've not run any other scripts at all.
I'm completely baffled. Just not seen this before.
RealWorldDev started a new conversation+100 XP
3mos ago
Hello all
I've just completed a Laravel upgrade from version 9 to 10. I followed the guide and ran composer update and everything ran though ok. I then started to test the application to make sure everything was working but couldn't log in. Thinking I was going mad, I opened TablePlus to check I was using the correct email address to sign in with but the users table was empty. I checked all the tables and there was no data in them at all. The only table that has data is the migrations table.
It's almost as if the update procedure has run a migrate:fresh. All tables are there, but all the data has gone. Thankfully, this was just on local but obviously I'm now worried about running this on the production environment (I will obviously take backups when I do).
Is there something I'm missing with all this? This particular project started on version 7 and that upgrade to version 8 never did this. Other projects I've updated haven't done this either. Anyone else seen this?
By the way the project is an API project so no views. The front end is an Angular app. I use Herd for my local setup. Just thought I'd add this for info.
Thanks all!