Jump to content

Featured Replies

Posted

Hi,

I am trying to upgrade my -testinstall with a somewhat bigger database.

During upgrade:
image.png

I made an upgrade.sql file from it, logged into ssh, and trying to execute the query:

[username@servername~]$ mysql -u username -p databasename < upgrade.sql

Enter password:

ERROR 1060 (42S21) at line 31: Duplicate column name 'post_score'

in phpmyadmin:
image.png

How i proceed with this?

Solved by Marc

Go to solution
  • Author

This is the full query:

ALTER TABLE forums_posts ADD( post_score FLOAT NULL , post_score_last_event BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Last time an event occurred which requires the post score to be recalculated', post_share_count BIGINT UNSIGNED NOT NULL DEFAULT 0 , post_quote_count BIGINT UNSIGNED NULL DEFAULT 0 , post_linked_count BIGINT UNSIGNED NOT NULL DEFAULT 0 , post_reaction_count BIGINT NULL DEFAULT 0 , post_view_time INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Average time this post was displayed on screen', post_view_time_view_count INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The number of times (roughly) this post\'s content was displayed in a browser', post_force_in_summary TINYINT UNSIGNED NOT NULL DEFAULT 0 , post_embed_count BIGINT UNSIGNED NOT NULL DEFAULT 0 , post_featured INT UNSIGNED NOT NULL DEFAULT 0 );


Its is all on line 31, i have a lot of -- comments above it, and only:

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";

SET AUTOCOMMIT = 0;

START TRANSACTION;

SET time_zone = "+00:00";

  • Community Expert
  • Solution

Take a look and see if you have post_score_last_event in that table. If you do, I suspect you've probably already run that query, so click on continue in that case

  • Author

yes post_score_last_event already exsist, for every record it contains a 0

  • Author

Ok, thanks! Upgrade succesfull.

Recently Browsing 0

  • No registered users viewing this page.