I get the following when I update db

Failed: DatabaseSchemaObjectExistsException: Cannot add field og_membership.group_type: field already exists. in DatabaseSchema_mysql->addField() (line 323 of /var/aegir/platforms/7/servers/drupal-7.12/includes/database/mysql/schema.inc).

Comments

jasonawant’s picture

Hi,

I'm not certain if this is related, but my db update failed when updates from 7.x-1.3 to 7.x-2.0-alpha2+29-dev with the following error.

Update #7200
Failed: DatabaseSchemaObjectExistsException: Cannot rename field_data_group_audience to field_deleted_data_5: table field_deleted_data_5 already exists. in DatabaseSchema_mysql->renameTable() (line 302 of includes/database/mysql/schema.inc).

I completed these steps to update. Let me know if I could provide any other information. Thanks, Jason.

  • I first disabled all of the following
    • og_create_perms
    • og_node_link
    • og_views
    • og_context
    • og_ui
  • I enabled
    • entityreference 7.x-1.0-rc1
    • views_bulk_operations 7.x-3.0-rc1
  • I removed the entire og/ directory
  • I installed 7.x-2.0-alpha2+29-dev.
  • I ran update.php
kholloway’s picture

This might help. After doing this OG to OG2 update myself:

I wanted to do a clean install of OG2 and not migrate anything. I disabled OG and ran the uninstall which prompted me that I needed to first remove the OG fields from content types that use them. I did this and was able to uninstall OG completely.

BUT, after doing this and looking at the sql DB, I noticed that og_membership "field_data_og_membership_request" and "field_revision_og_membership_request" still exist. The module uninstall should have removed these yet they are still there. This might be creating the issue when doing the upgrade/install of OG2.

I'm still investigating but sharing my findings.

kholloway’s picture

Forgot to update my findings but in the end it seemed like OG1->OG2 was more complicated for a new project than just blowing away the DB and going with a fresh OG2 install in the first place. Of course you could manually remove these tables from your DB but that's more of a bandaid to move forward if starting again isn't an option.

Of course if I can help with further troubleshooting I'm willing but it seems like with the updated Dev version of OG2 it might be better to just use that version which hopefully has these issues resolved. There are quite a few very good patches applied to it already.

amitaibu’s picture

Status: Active » Postponed (maintainer needs more info)
joelpittet’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)

Drupal 7 reached end-of-life and the D7 version of Organic Groups is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues. If you still have questions about using Organic Groups on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #og channel on Drupal Slack.

If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome! 💙

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.