views:

12

answers:

1

Hi there,

I've taken over a Drupal website. I'm trying to update the og module. It is currently version 1. I tried to upgrade it to the latest version but when I ran update.php it failed. So I thought I'd just try updating it to version 1.4. However, when I did this I then got the following errors when I ran update.php:

# user warning: Table 'og_ancestry' already exists query: CREATE TABLE og_ancestry ( nid int(11) NOT NULL, group_nid int(11) NOT NULL, is_public int(1) NULL, KEY (nid), KEY (group_nid) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in /homepages/0/d309344694/htdocs/openup6/sites/default/modules/ogr/og.install on line 218.
# user warning: Unknown column 'is_public' in 'field list' query: INSERT INTO og_ancestry (nid, group_nid, is_public) SELECT nid, gid, is_public FROM og_migrate in /homepages/0/d309344694/htdocs/openup6/sites/default/modules/ogr/og.install on line 239.
# warning: array_merge() [function.array-merge]: Argument #2 is not an array in /homepages/0/d309344694/htdocs/openup6/update.php on line 174.
# user warning: Duplicate entry 'openup-og_views-1' for key 2 query: UPDATE blocks SET module = 'og_views', delta = '1' WHERE module = 'og' AND delta = '5' in /homepages/0/d309344694/htdocs/openup6/sites/default/modules/ogr/og.install on line 377.
# user warning: Unknown column 'selective' in 'og' query: ALTER TABLE og CHANGE `selective` `og_selective` INT NOT NULL DEFAULT 0 in /homepages/0/d309344694/htdocs/openup6/includes/database.mysql-common.inc on line 520.
# user warning: Unknown column 'register' in 'og' query: ALTER TABLE og CHANGE `register` `og_register` TINYINT NOT NULL DEFAULT 0 in /homepages/0/d309344694/htdocs/openup6/includes/database.mysql-common.inc on line 520.
# user warning: Unknown column 'theme' in 'og' query: ALTER TABLE og CHANGE `theme` `og_theme` VARCHAR(255) DEFAULT NULL in /homepages/0/d309344694/htdocs/openup6/includes/database.mysql-common.inc on line 520.
# user warning: Unknown column 'directory' in 'og' query: ALTER TABLE og CHANGE `directory` `og_directory` TINYINT NOT NULL DEFAULT 0 in /homepages/0/d309344694/htdocs/openup6/includes/database.mysql-common.inc on line 520.
# user warning: Unknown column 'description' in 'og' query: ALTER TABLE og CHANGE `description` `og_description` VARCHAR(255) DEFAULT NULL in /homepages/0/d309344694/htdocs/openup6/includes/database.mysql-common.inc on line 520.
# user warning: Unknown column 'notification' in 'og' query: ALTER TABLE og CHANGE `notification` `og_notification` TINYINT NOT NULL DEFAULT 0 in /homepages/0/d309344694/htdocs/openup6/includes/database.mysql-common.inc on line 520.
# user warning: Unknown column 'language' in 'og' query: ALTER TABLE og CHANGE `language` `og_language` VARCHAR(12) NOT NULL DEFAULT '' in /homepages/0/d309344694/htdocs/openup6/includes/database.mysql-common.inc on line 520.
# user warning: Duplicate column name 'og_private' query: ALTER TABLE og CHANGE `private` `og_private` TINYINT NOT NULL DEFAULT 0 in /homepages/0/d309344694/htdocs/openup6/includes/database.mysql-common.inc on line 520.
# warning: Missing argument 1 for og_notifications_menu() in /homepages/0/d309344694/htdocs/openup6/sites/default/modules/ogr/og_notifications/og_notifications.module on line 15.

and

Update #6002

    * Failed: ALTER TABLE {og} CHANGE `selective` `og_selective` INT NOT NULL DEFAULT 0
    * Failed: ALTER TABLE {og} CHANGE `register` `og_register` TINYINT NOT NULL DEFAULT 0
    * Failed: ALTER TABLE {og} CHANGE `theme` `og_theme` VARCHAR(255) DEFAULT NULL
    * Failed: ALTER TABLE {og} CHANGE `directory` `og_directory` TINYINT NOT NULL DEFAULT 0
    * Failed: ALTER TABLE {og} CHANGE `description` `og_description` VARCHAR(255) DEFAULT NULL
    * Failed: ALTER TABLE {og} CHANGE `notification` `og_notification` TINYINT NOT NULL DEFAULT 0
    * Failed: ALTER TABLE {og} CHANGE `language` `og_language` VARCHAR(12) NOT NULL DEFAULT ''
    * Failed: ALTER TABLE {og} CHANGE `private` `og_private` TINYINT NOT NULL DEFAULT 0

Can anyone help?

A: 

If I understand you correctly:

  1. You were running OG version 1
  2. You tried to update it to the latest version i.e. version 2.1 -- that update failed
  3. So now you tried to update it to version 1.4 -- That has failed too.

Unfortunately, what has happened is that the database tables have been changed to correspond to the "schema" for version 2.1. That upgrade did not succeed completely for an unknown reason (difficult to say.. could be so many things).

Now you cannot upgrade to 1.4. Actually that would mean "downgrading". Thats not possible in Drupal.

You should always take a database dump before performing an upgrade. So many things can go wrong.

Sid NoParrots
Thank you for your answer. After I had tried upgrading to version 2.1 and it had failed, I then restored the original database so I went back to OG version 1. I then tried to upgrade to version 1.4 (from version 1), but this failed too. I wasn't downgrading.
Ben