Upgrading v3.5.0 to v3.7.0 error
AndyYangUK opened this issue · comments
I've tried upgrading from v3.5 to v3.6, and from v3.5 to v3.7, but both experiencing issues. Can someone help with this please?
Looks like the database format has changed and there are missing columns in the table. Without starting from scratch, is there a way to force Monica to add the extra columns?
I have gone into the container and ran php artisan monica:update --force
after changing to a new version, but no luck.
From v3.5 to v3.6
Whoops! Something went wrong.
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'contacts.deleted_at' in 'where clause' (SQL: select `accounts`.*, (select count(*) from `contacts` where `accounts`.`id` = `contacts`.`account_id` and `address_book_id` is null and `contacts`.`deleted_at` is null) as `contacts_count`, (select count(*) from `reminders` where `accounts`.`id` = `reminders`.`account_id`) as `reminders_count`, (select count(*) from `notes` where `accounts`.`id` = `notes`.`account_id`) as `notes_count`, (select count(*) from `activities` where `accounts`.`id` = `activities`.`account_id`) as `activities_count`, (select count(*) from `gifts` where `accounts`.`id` = `gifts`.`account_id`) as `gifts_count`, (select count(*) from `tasks` where `accounts`.`id` = `tasks`.`account_id`) as `tasks_count` from `accounts` where `accounts`.`id` = 1 limit 1)
From v3.5 to v3.7
Whoops! Something went wrong.
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'contacts.deleted_at' in 'where clause' (SQL: select `accounts`.*, (select count(*) from `contacts` where `accounts`.`id` = `contacts`.`account_id` and `address_book_id` is null and `contacts`.`deleted_at` is null) as `contacts_count`, (select count(*) from `reminders` where `accounts`.`id` = `reminders`.`account_id`) as `reminders_count`, (select count(*) from `notes` where `accounts`.`id` = `notes`.`account_id`) as `notes_count`, (select count(*) from `activities` where `accounts`.`id` = `activities`.`account_id`) as `activities_count`, (select count(*) from `gifts` where `accounts`.`id` = `gifts`.`account_id`) as `gifts_count`, (select count(*) from `tasks` where `accounts`.`id` = `tasks`.`account_id`) as `tasks_count` from `accounts` where `accounts`.`id` = 1 limit 1)
It seems you are missing the 2022_01_02_222042_contact_soft_delete
migration, but the migration is supposed to be run automatically.
Did you ran your docker container with a specific command? In that case, the monica:update
is not run automatically.
Anyway, I'll close this issue as it's not happening in a normal situation.