Problems w/ Resources after upgrade

Re: Problems w/ Resources after upgrade

by Brian Dichter -
Number of replies: 0
Hi Martin. Thanks for this suggestion. This partially worked. The data type was changed and many of the values were changed from integers to strings (apparently all of the integers except for the ones with the value of "0"...unfortunately, not all of them...the script ran into some errors:

1060: Duplicate column name 'popup'

        adodb_mysql._execute(ALTER TABLE mdl_resource ADD popup TEXT DEFAULT '' AFTER `allt..., false) % line 804, file: adodb.inc.php
      adodb_mysql.execute(ALTER TABLE mdl_resource ADD popup TEXT DEFAULT '' AFTER `allt...) % line 30, file: datalib.php
    execute_sql(ALTER TABLE mdl_resource ADD popup TEXT DEFAULT '' AFTER `allt...) % line 211, file: datalib.php
  table_column(resource, , popup, text, , , , , alltext) % line 19, file: mysql.php
resource_upgrade(2004070900, Object:stdClass) % line 150, file: adminlib.php

1061: Duplicate key name 'course'

        adodb_mysql._execute(ALTER TABLE mdl_resource ADD INDEX course (course), false) % line 804, file: adodb.inc.php
      adodb_mysql.execute(ALTER TABLE mdl_resource ADD INDEX course (course)) % line 30, file: datalib.php
    execute_sql(ALTER TABLE mdl_resource ADD INDEX course (course)) % line 152, file: datalib.php
  modify_database(, ALTER TABLE prefix_resource ADD INDEX course (course);) % line 57, file: mysql.php
resource_upgrade(2004070900, Object:stdClass) % line 150, file: adminlib.php




I think I'll go ahead and change the remaining values in the type column and then spend some time checking the tables against the fresh install on my test server or an ER diagram to see if there's anything else that needs to be fixed.

Thanks for your help!