500: Internal Server Error

Hi
Have update to new version release 5.7.47-W138
Trying to add new client but instead get the 500: Internal Server Error

the server logs show this error message:

[2023-11-13 15:31:32] production.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘classification’ in ‘field list’ (Connection: mysql, SQL: insert into clients (company_id, user_id, name, website, private_notes, public_notes, balance, paid_to_date, country_id, is_deleted, client_hash, settings, classification, group_settings_id, address1, address2, city, state, postal_code, phone, industry_id, size_id, vat_number, id_number, shipping_address1, shipping_address2, shipping_city, shipping_state, shipping_postal_code, shipping_country_id, custom_value1, custom_value2, custom_value3, custom_value4, routing_id, is_tax_exempt, assigned_user_id, updated_at, created_at) values (3, 1, Green Wagon, ?, ?, ?, 0, 0, 710, 0, B7onnOwtJUcItaJMJituXb2O8cFeBhjNq0mkDXFb, {“entity”:“App\Models\Client”,“industry_id”:“”,“size_id”:“”,“currency_id”:“4”}, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, ?, 2023-11-13 15:31:32.033030, 2023-11-13 15:31:32.033030)) {“userId”:1,“exception”:"[object] (Illuminate\Database\QueryException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘classification’ in ‘field list’ (Connection: mysql, SQL: insert into clients (company_id, user_id, name, website, private_notes, public_notes, balance, paid_to_date, country_id, is_deleted, client_hash, settings, classification, group_settings_id, address1, address2, city, state, postal_code, phone, industry_id, size_id, vat_number, id_number, shipping_address1, shipping_address2, shipping_city, shipping_state, shipping_postal_code, shipping_country_id, custom_value1, custom_value2, custom_value3, custom_value4, routing_id, is_tax_exempt, assigned_user_id, updated_at, created_at) values (3, 1, Green Wagon, ?, ?, ?, 0, 0, 710, 0, B7onnOwtJUcItaJMJituXb2O8cFeBhjNq0mkDXFb, {"entity":"App\\Models\\Client","industry_id":"","size_id":"","currency_id":"4"}, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, ?, 2023-11-13 15:31:32.033030, 2023-11-13 15:31:32.033030)) at /home/u815756910/domains/website.co.za/public_html/ninja/vendor/laravel/framework/src/Illuminate/Database/Connection.php:822)
[stacktrace]

Hi,

It may help to run php artisan migrate

This is the message i get when running the php artisan migrate command I have also moved the migration entries under database/migrations into another folder as suggested from a previous support thread of mine 500: Server Error on export - #20 by hillel still get the 500 message when trying to add a new client:

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘recurring_e
xpenses’ already exists (Connection: mysql, SQL: create table recurring_ex penses (id int unsigned not null auto_increment primary key, created_at timestamp(6) null, updated_at timestamp(6) null, deleted_at timestamp
null, company_id int unsigned not null, vendor_id int unsigned null, user_id int unsigned not null, status_id int unsigned not null, invoice _id int unsigned null, client_id int unsigned null, bank_id int unsign
ed null, project_id int unsigned null, payment_type_id int unsigned nul
l, recurring_expense_id int unsigned null, is_deleted tinyint(1) not nu
ll default ‘0’, uses_inclusive_taxes tinyint(1) not null default ‘1’, ta x_name1 varchar(191) null, tax_name2 varchar(191) null, tax_name3 varc
har(191) null, date date null, payment_date date null, should_be_invoi ced tinyint(1) not null default ‘0’, invoice_documents tinyint(1) not nu
ll default ‘0’, transaction_id varchar(191) null, custom_value1 varchar
(191) null, custom_value2 varchar(191) null, custom_value3 varchar(191)
null, custom_value4 varchar(191) null, category_id int unsigned null,
calculate_tax_by_amount tinyint(1) not null default ‘0’, tax_amount1 de
cimal(20, 6) null, tax_amount2 decimal(20, 6) null, tax_amount3 decimal
(20, 6) null, tax_rate1 decimal(20, 6) null, tax_rate2 decimal(20, 6) n
ull, tax_rate3 decimal(20, 6) null, amount decimal(20, 6) null, foreig n_amount decimal(20, 6) null, exchange_rate decimal(20, 6) not null defa
ult ‘1’, assigned_user_id int unsigned null, number varchar(191) null,
invoice_currency_id int unsigned null, currency_id int unsigned null, private_notes text null, public_notes text null, transaction_reference
text null, frequency_id int unsigned not null, last_sent_date datetime
null, next_send_date datetime null, remaining_cycles int null) default
character set utf8mb4 collate ‘utf8mb4_unicode_ci’ engine = InnoDB)

You should be able to fix this by commenting out the relevant lines in the migration file and then re-running the migrate command.

Can you give me some guidance on how to go about editing the migration file, where do I find the migration file and can you give me an example of how to comment out a relevant line? Sorry not a programmer.

The migration files are in database/migrations.

You can comment a line by adding // to the start of it.