venturedrake / laravel-crm

Open Source Laravel CRM Package
https://laravelcrm.com
MIT License
251 stars 95 forks source link

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) #52

Open mindaugaskatinas opened 6 months ago

mindaugaskatinas commented 6 months ago

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.

andrewdrake commented 6 months ago

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

krestt commented 6 months ago

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 ''

mindaugaskatinas commented 6 months ago

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.