laravel-crm icon indicating copy to clipboard operation
laravel-crm copied to clipboard

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cncerp.crm_users' doesn't exist (Connection: mysql, SQL: alter table `crm_users` add `url` varchar(255) null)

Open mindaugaskatinas opened this issue 1 year ago • 3 comments

  • Laravel CRM Version: 0.19.10
  • PHP Version: 8.2

Description:

On clean install (steps from offcial documentation) throws error while migrating 2024_02_15_172046_add_client_to_laravel_crm_deals_table : Illuminate\Database\QueryException SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cncerp.crm_users' doesn't exist (Connection: mysql, SQL: alter table crm_users add url varchar(255) null)

Steps To Reproduce:

Clean isntall on "Step 6. Run migrations:"

Thanks.

mindaugaskatinas avatar Feb 15 '24 17:02 mindaugaskatinas

Thanks for reporting, I will look into this. I haven't done too much testing with PHP 8.2 as yet.

andrewdrake avatar Feb 19 '24 00:02 andrewdrake

I did solved that issue. When you install, the installer ask you for table prefix to use or not. By default it is empty in installer, so he create all db tables without crm_ prefix. But in config file (config/laravel-crm.php) wherever is db_table_prefix, it uses "crm" ... So I had just to remove the crm and live it as empty string ''

krestt avatar Mar 02 '24 22:03 krestt

Thanks. This "But in config file (config/laravel-crm.php) wherever is db_table_prefix, it uses "crm" ... So I had just to remove the crm and leave it as empty string'" worked for me.

mindaugaskatinas avatar Mar 05 '24 08:03 mindaugaskatinas