lincanbin/Carbon-Forum

update failed, SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;

Closed this issue · 4 comments

hoogw commented

I install master package(5.8.0) first. works fine.
Now I download developer package,
except upload folder, replace everything else.

then go to carbon/update,

fill out the info, click update button

get error:

Unhandled Exception.
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`carbon_app ENGINE=InnoDB' at line 1
You can find the error back in the log.

Have any idea?

The development branch may have some unsolved issues.
And I have solved this issue now.

hoogw commented

I have tried master upgrade to developer.

Yes, you did fix above bug, I see update success page!!

But after that,
I open home page, get error:

Unhandled Exception.
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'NewReply' in 'field list'
You can find the error back in the log.

Excute this sql:

ALTER TABLE carbon_users ADD COLUMN `NewMention` INT (10) UNSIGNED NOT NULL DEFAULT 0 AFTER `NumFavTopics`;
ALTER TABLE carbon_users ADD COLUMN `NewReply` INT (10) UNSIGNED NOT NULL DEFAULT 0 AFTER `NumFavTopics`;
UPDATE carbon_users SET NewReply = NewMessage;
UPDATE carbon_users SET NewMessage = 0;
hoogw commented

Successful update from master version to current developer version.

Thank you for fixing the problem. This is closed.