Monica: Cannot delete account due to inexistence of contact_photo.account_id

Created on 15 Dec 2018  路  3Comments  路  Source: monicahq/monica

Describe the bug
When deleting an account in a fresh install of v2.10.2, I get the following error:

SQLSTATE[42S22]:
Column not found: 1054 Unknown column 'account_id' in 'where clause' (SQL: delete from contact_photo where account_id = 1)

I am running this on a local server with a checkout of v2.10.2 from git.

From my mysql DB, I get this:

MariaDB [monica]> describe contact_photo
    -> ;
+------------+------------------+------+-----+---------+-------+
| Field      | Type             | Null | Key | Default | Extra |
+------------+------------------+------+-----+---------+-------+
| contact_id | int(10) unsigned | NO   | MUL | NULL    |       |
| photo_id   | int(10) unsigned | NO   | MUL | NULL    |       |
| created_at | timestamp        | YES  |     | NULL    |       |
| updated_at | timestamp        | YES  |     | NULL    |       |
+------------+------------------+------+-----+---------+-------+
4 rows in set (0.01 sec)
bug

All 3 comments

Thanks for the bug report, and sorry this happened. 2.10.2 is the version in production, but you are not on this version - you are on the master branch, which has this new photo upload feature. We'll fix this before shipping 2.11.

Thanks @djaiss. I think I see what happened. I must've run setup:production. While I was still on the master branch and only after checked out the tagged version. Is there a way to use an older DB model without losing any data?

I think it should work now with the new release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jkbecker picture jkbecker  路  3Comments

PM232 picture PM232  路  3Comments

pc-zookeeper picture pc-zookeeper  路  4Comments

mattdavenport picture mattdavenport  路  3Comments

vesper8 picture vesper8  路  4Comments