在Drupal中更新有机组模块

时间:2010-10-11 14:22:59

标签: drupal organic-groups

我接管了一个Drupal网站。我正在尝试更新og模块。它目前是版本1.我尝试将其升级到最新版本但是当我运行update.php时它失败了。所以我想我只是尝试将其更新到版本1.4。但是,当我这样做时,我在运行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.

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

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:1)

如果我理解正确的话:

  1. 您正在运行OG版本1
  2. 您尝试将其更新为最新版本,即版本2.1 - 更新失败
  3. 所以现在你试图将它更新到版本1.4 - 那也失败了。
  4. 不幸的是,发生的事情是数据库表已经更改为对应于2.1版的“模式”。由于一个未知的原因,升级没有完全成功(很难说......可能是这么多东西)。

    现在你无法升级到1.4。实际上这意味着“降级”。这在Drupal中是不可能的。

    在执行升级之前,应始终执行数据库转储。很多事情都可能出错。