• We’ve disocered that our websites were not upgraded properly. Which resulted in the tables not being changed. Does anyone know the right commands in mysql to create.

    This is the old database for the wp_terms table:

    CREATE TABLE wp_terms (
      term_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      name varchar(200) NOT NULL DEFAULT '',
      slug varchar(200) NOT NULL DEFAULT '',
      term_group bigint(10) NOT NULL DEFAULT '0',
      PRIMARY KEY (term_id),
      UNIQUE KEY slug (slug),
      KEY name (name)
    ) ENGINE=InnoDB AUTO_INCREMENT=644 DEFAULT CHARSET=utf8$$

    And this is the new way:

    CREATE TABLE wp_terms (
      term_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      name varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      slug varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
      term_group bigint(10) NOT NULL DEFAULT '0',
      PRIMARY KEY (term_id),
      KEY slug (slug(191)),
      KEY name (name(191))
    ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci$$

    I am not sure how to edit this in mysql though….

  • The topic ‘WordPress Database Error Duplicate Entry’ is closed to new replies.