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

in reply to alfredb

What do you see, when you execute this command:
bin/console dbstructure drop
in reply to Michael Vogel

@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

in reply to alfredb

What is the result of this command?
show create table item;
in reply to alfredb

"Error, this is a private paste or is pending moderation. If this paste belongs to you, please login to Pastebin to view it."
in reply to alfredb

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.
in reply to Michael Vogel

@Michael Vogel OK, huge thanks so far.
I have to care about my Hubzilla instance first.
in reply to alfredb

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.
in reply to alfredb

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.
in reply to Michael Vogel

@Michael Vogel Done that, the error production stopped.
Once again, thanks for your assistance! You made my day.
in reply to alfredb

@alfredb Have you run the obligatory database update after upgrading Friendica? ./bin/console dbstructure update and then ./bin/console postupdate

Friendica Support reshared this.

in reply to alfredb

obligatory database update
AFAIK this is or should be done automatically,
But yes, both is done,
in reply to alfredb

@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.

Friendica Support reshared this.