Problem creating tables during INSTALL - Printable Version +- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com) +-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html) +--- Forum: OpenDocMan Support - Community Based (https://forum.opendocman.com/forum-6.html) +--- Thread: Problem creating tables during INSTALL (/thread-628.html) |
Problem creating tables during INSTALL - ecamargo - 07-01-2013 Mac OS X 10.8.4 Apache/2.2.22 PHP/5.3/15 MySQL 5.7.1-m11 OpenDocMan 1.2.6.6 Thank you in advance for any assistance. I am new and I cannot figure this out. During the installation, I am stuck here: Checking that templates_c folder is writeable... OK installing... Database Created Database Selected Could not create odm_data table. Error wasuplicate index 'id_2' defined on the table 'docman.odm_data'. This is deprecated and will be disallowed in a future release. Thanks, Emmanuel Re:(RESOLVED) Problem creating tables during INSTALL - ecamargo - 07-02-2013 I may have resolved it. It appears to be a bug that was fixed in MySQL 5.6. ../opendocman-1.2.6.6/install/odm.php // Data Table $result = mysql_query(" DROP TABLE IF EXISTS {$dbprefix}data ") or die("<br>Could not create {$dbprefix}data table. Error was:" . mysql_error()); $result = mysql_query(" CREATE TABLE {$dbprefix}data ( id int(11) unsigned NOT NULL auto_increment, category int(11) unsigned NOT NULL default '0', owner int(11) unsigned default NULL, realname varchar(255) NOT NULL default '', created datetime NOT NULL default '0000-00-00 00:00:00', description varchar(255) default NULL, comment varchar(255) default '', status smallint(6) default NULL, department smallint(6) unsigned default NULL, default_rights tinyint(4) default NULL, publishable tinyint(4) default NULL, reviewer int(11) unsigned default NULL, reviewer_comments varchar(255) default NULL, PRIMARY KEY (id)[b], KEY data_idx (id,owner), KEY id (id), KEY id_2 (id), KEY publishable (publishable), KEY description (description)[/b] ) ENGINE = MYISAM ") or die("<br>Could not create {$dbprefix}data table. Error was:" . mysql_error()); -----------------CHANGE TO ---------------------------- $result = mysql_query(" DROP TABLE IF EXISTS {$dbprefix}data ") or die("<br>Could not create {$dbprefix}data table. Error was:" . mysql_error()); $result = mysql_query(" CREATE TABLE {$dbprefix}data ( id int(11) unsigned NOT NULL auto_increment, category int(11) unsigned NOT NULL default '0', owner int(11) unsigned default NULL, realname varchar(255) NOT NULL default '', created datetime NOT NULL default '0000-00-00 00:00:00', description varchar(255) default NULL, comment varchar(255) default '', status smallint(6) default NULL, department smallint(6) unsigned default NULL, default_rights tinyint(4) default NULL, publishable tinyint(4) default NULL, reviewer int(11) unsigned default NULL, reviewer_comments varchar(255) default NULL, PRIMARY KEY (id) ) ENGINE = MYISAM ") or die("<br>Could not create {$dbprefix}data table. Error was:" . mysql_error()); -------------REASONS FOR CHANGING IT----------------------- <!-- m --><a class="postlink" href="http://www.mysqlperformanceblog.com/2013/05/31/the-small-improvements-of-mysql-5-6-duplicate-index-detection/">http://www.mysqlperformanceblog.com/201 ... detection/</a><!-- m --> <!-- m --><a class="postlink" href="http://bugs.mysql.com/bug.php?id=37520">http://bugs.mysql.com/bug.php?id=37520</a><!-- m --> |