Skip to:
Content
Pages
Categories
Search
Top
Bottom

After database migration getting the following error: Unknown column ‘public’


  • d3vnu77
    Participant

    @d3vnu77

    The following query is failing after database migration on the activity page:

    SELECT DISTINCT a.id
    FROM wp_bp_activity a
    WHERE a.type IN ( ‘activity_status’,’activity_quote’,’activity_photo’,’activity_video’,’activity_audio’,’activity_giphy’,’activity_update’,’new_member’,’friends_register_activity_action’,’created_group’,’joined_group’,’activity_update’ )
    AND a.is_spam = 0
    AND a.hide_sitewide = 0
    AND a.type NOT IN (‘activity_comment’, ‘last_activity’)
    AND a.privacy = “public”
    AND a.user_id NOT IN(87,409)
    ORDER BY a.date_recorded DESC, a.id DESC
    LIMIT 0, 21

    1054 – Unknown column ‘public’ in ‘where clause’

    Any idea on how to fix this?

Viewing 6 replies - 1 through 6 (of 6 total)

  • d3vnu77
    Participant

    @d3vnu77

    The above query fails on an unauthenticated user.

    On an authenticated member the follow query fails:

    SELECT DISTINCT a.id
    FROM wp_bp_activity a
    WHERE a.type IN ( ‘activity_status’,’activity_quote’,’activity_photo’,’activity_video’,’activity_audio’,’activity_giphy’,’activity_update’,’new_member’,’friends_register_activity_action’,’created_group’,’joined_group’,’activity_update’ )
    AND a.is_spam = 0
    AND a.hide_sitewide = 0
    AND a.type NOT IN (‘activity_comment’, ‘last_activity’)
    AND a.privacy NOT IN (‘onlyme’,’friends’)
    OR a.user_id IN ( 360,244,1,274,262,172,128,46,263,270,264,261,105,168,148,155,154,145,146,144,116,133,107,135,137,115,114,118,117,111,82,37,78,93,90,79,75,31,38,41,39,35,15,21,12,10,29,33,28,26,11,2)
    AND a.privacy = “friends”
    OR a.user_id = 2
    AND a.privacy = “onlyme”
    AND a.user_id NOT IN(87,409)
    ORDER BY a.date_recorded DESC, a.id DESC
    LIMIT 0, 21

    1054 – Unknown column ‘friends’ in ‘where clause’


    d3vnu77
    Participant

    @d3vnu77

    I should also mention that the migration was from a Maria15 database to a MySQL 8 Managed Database with Digital Ocean


    Varun Dubey
    Participant

    @vapvarun

    @d3vnu77 try to reimport database tables seems, some rows missed during the import process.


    d3vnu77
    Participant

    @d3vnu77

    @vapvarun Which rows would those be? This was the second time I’ve exported and then imported the database with the same result.

    If I am logged in as admin, I can see all the activity fine.


    d3vnu77
    Participant

    @d3vnu77

    @vapvarun I’ve tested and the same amount of rows exist in the new database


    d3vnu77
    Participant

    @d3vnu77

    Nevermind, it looks like you may be right!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar