v5.3.46 - Companies exist in DB but not visible in UI after migration

Version ie v5.3.46

Environment Docker (local: nginx + php-fpm + mysql:8.0) + cPanel Shared Hosting (production)

Checklist

  • Cannot replicate on demo site (migration-specific issue)
    • Have searched existing issues
    • Have inspected logs in storage/logs/laravel.log — no relevant errors found

Describe the bug

After migrating an old Invoice Ninja v5 database to a new installation (local Docker + production cPanel/shared hosting), companies exist in the database but are not properly visible in the UI.

Setup:

  • Invoice Ninja v5 (self-hosted)
    • Docker locally (nginx + php-fpm + mysql:8.0)
    • cPanel shared hosting on production
    • DB imported via MySQL dump
      The problem:
      All company data exists in the database — confirmed:
  • 8 companies in the companies table, all with account_id = 1
    • All companies have correct names in the settings JSON field
    • company_user table correctly links user_id = 1 (owner) to all 8 companies
    • Invoice counts per company: 629, 234, 31, 17, 15, 14, 2 — data is there
    • accounts table: 1 row, default_company_id = 2
    • APP_KEY is the same between old and new installation
    • db column in companies = mysql for all rows
      On production: Only the primary company (id=2, Flyvision SIA) is visible with its invoices. All other companies appear in the company switcher but show no data (empty clients, invoices, etc.).

Locally: No companies visible at all after import.

Steps To Reproduce

  1. Export MySQL dump from working Invoice Ninja v5 instance
    1. Set up fresh Invoice Ninja v5 on Docker (local) or cPanel (production)
    1. Import the MySQL dump into the new installation
    1. Use the same APP_KEY as the original installation
    1. Log in and attempt to switch between companies

Expected Behavior

All 8 companies should be fully accessible in the UI with all their data (clients, invoices, etc.) visible when switching between companies — just as they were in the original installation.

Additional context

What I’ve tried:

  • php artisan optimize:clear
    • php artisan config:clear
    • php artisan cache:clear
      Could this be related to the company_tokens table or something with user authentication tokens not matching after migration? Any guidance appreciated.

Hi,

Do you see a difference between the web and desktop/mobile apps?

same story on mobile app, main company ok and no data in other company profiles.

Sorry, I’m not sure how to resolve this. I suggest asking in a discussion on GitHub.