Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Why will update utility not update the database?

stemidstemid New
edited December 2014 in Vanilla 2.0 - 2.8

Hi vanilla community

I am new to this software but experienced with php and mysql.

So I was going to update a 2.0.18 to 2.1.6 and ran into an error where the update utility page says Failure, The update was not successful.

No more info than that so I followed all the troubleshooting steps in the update guide but nothing helped.

I started tracing the error in the code with simple echo statements and found that the problem is most likely with a database update.

This code in particular is where everything stops. On line 589 of applications/dashboard/settings/structure.php.

$Construct->Table('Tag') ->PrimaryKey('TagID') ->Column('Name', 'varchar(255)', FALSE, 'unique') ->Column('Type', 'varchar(10)', TRUE, 'index') ->Column('InsertUserID', 'int', TRUE, 'key') ->Column('DateInserted', 'datetime') ->Column('CategoryID', 'int', -1, 'unique') ->Engine('InnoDB') ->Set($Explicit, $Drop);

With my limited experience in PHP I can trace the error to line 392 of file library/database/class.databasestructure.php where I believe Gdn_DatabaseStructure->_Modify() is being called but then I can't follow it anymore.

So why is the update utility unable to modify my database table GDN_Tag?

Edit: Here is some more info I thought might be of interest, just a dump of how my GDN_Tag table looks in the database.

CREATE TABLE 'GDN_Tag' ( 'TagID' int(11) NOT NULL AUTO_INCREMENT, 'Name' varchar(255) COLLATE utf8_unicode_ci NOT NULL, 'Type' varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, 'InsertUserID' int(11) DEFAULT NULL, 'DateInserted' datetime NOT NULL, 'CountDiscussions' int(11) NOT NULL DEFAULT '0', PRIMARY KEY ('TagID'), UNIQUE KEY 'UX_Tag' ('Name'), KEY 'IX_Tag_Type' ('Type'), KEY 'FK_Tag_InsertUserID' ('InsertUserID') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


Best Answer


Sign In or Register to comment.