Skip to main content


Since updating to 2024.03 I get continuously database errors like:

1054
error
Unknown column 'contact-id' in 'where clause'
params
DELETE FROM item WHERE (contact-id = 103118)

Who knows what's gone wrong here?

!Friendica Support #Friendica

What do you see, when you execute this command:
bin/console dbstructure drop

@Michael Vogel

These tables are not used for friendica and will be deleted when you execute "dbstructure drop -e":

item_id
poll
sign
term
item
auth_codes
tokens
clients
profile_check
addon

What is the result of this command?
show create table item;
"Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it."
Have you used Hubzilla or something different in the database? The item table is not used anymore by Friendica for several years now. So we have got the command to remove these tables. But these table doesn't look like a table from Friendica, so removing it, could destroy some other system.
@Michael Vogel OK, huge thanks so far.
I have to care about my Hubzilla instance first.
Having both systems in a single database is a huge risk! I cannot guarantee that both systems use completely different tables, especially since they have got the same heritage. So it can happen that you destroy one or both systems by running them in parallel.
@Michael Vogel Of course, it's not the same database, but the same server.
Have a look into that item table if the data in it is new or old. With dbstructure drop -e you can delete all the tables. So only do it, after you created a backup and you are sure that you can delete the data.
@Michael Vogel Done that, the error production stopped.
Once again, thanks for your assistance! You made my day.
@alfredb Have you run the obligatory database update after upgrading Friendica? ./bin/console dbstructure update and then ./bin/console postupdate
obligatory database update
AFAIK this is or should be done automatically,
But yes, both is done,

@alfredb Yes, I now see it in your /friendica info page:

This is Friendica, version 2024.03 that is running at the web location https://social.alfredbuehler.ch. The database version is 1557/1557, the post update version is 1550/1550.