Setting up module tables

Setting up module tables

by Mark Gritten -
Number of replies: 0
Hello,

I'm setting up Moodle on PHP 4.3.9 and experiencing some problems related to the permissions my database user has to set up the installation.

As I don't have the permissions (yet...hopefully...) to 'CREATE UNIQUE INDEX', I've had to set up all the unique indexes manually using phpMyAdmin.

This means that I'm now at the installation stage where the error messages show the following:

This script generated 2 warnings - Scroll to the first warning

assignment


(mysql): CREATE TABLE mdl_assignment ( id BIGINT(10) unsigned NOT NULL auto_increment, course BIGINT(10) unsigned NOT NULL DEFAULT 0, name VARCHAR(255) NOT NULL DEFAULT '', description TEXT NOT NULL, format SMALLINT(4) unsigned NOT NULL DEFAULT 0, assignmenttype VARCHAR(50) NOT NULL DEFAULT '', resubmit TINYINT(2) unsigned NOT NULL DEFAULT 0, preventlate TINYINT(2) unsigned NOT NULL DEFAULT 0, emailteachers TINYINT(2) unsigned NOT NULL DEFAULT 0, var1 BIGINT(10) DEFAULT 0, var2 BIGINT(10) DEFAULT 0, var3 BIGINT(10) DEFAULT 0, var4 BIGINT(10) DEFAULT 0, var5 BIGINT(10) DEFAULT 0, maxbytes BIGINT(10) unsigned NOT NULL DEFAULT 100000, timedue BIGINT(10) unsigned NOT NULL DEFAULT 0, timeavailable BIGINT(10) unsigned NOT NULL DEFAULT 0, grade BIGINT(10) NOT NULL DEFAULT 0, timemodified BIGINT(10) unsigned NOT NULL DEFAULT 0, CONSTRAINT PRIMARY KEY (id) )
1050: Table 'mdl_assignment' already exists
      

(mysql): ALTER TABLE mdl_assignment COMMENT='Defines assignments'
Success

(mysql): CREATE TABLE mdl_assignment_submissions ( id BIGINT(10) unsigned NOT NULL auto_increment, assignment BIGINT(10) unsigned NOT NULL DEFAULT 0, userid BIGINT(10) unsigned NOT NULL DEFAULT 0, timecreated BIGINT(10) unsigned NOT NULL DEFAULT 0, timemodified BIGINT(10) unsigned NOT NULL DEFAULT 0, numfiles BIGINT(10) unsigned NOT NULL DEFAULT 0, data1 TEXT, data2 TEXT, grade BIGINT(11) NOT NULL DEFAULT 0, submissioncomment TEXT NOT NULL, format SMALLINT(4) unsigned NOT NULL DEFAULT 0, teacher BIGINT(10) unsigned NOT NULL DEFAULT 0, timemarked BIGINT(10) unsigned NOT NULL DEFAULT 0, mailed TINYINT(1) unsigned NOT NULL DEFAULT 0, CONSTRAINT PRIMARY KEY (id) )
1050: Table 'mdl_assignment_submissions' already exists
   

So I'm stuck - if I drop the tables and run the script again, I'm faced with the error that I don't have the right permissions to 'CREATE UNIQUE INDEX', but if I don't, I can't get past the error messages above.

Any ideas how to proceed?

Ideally I'd like to tell the script that the tables are already there, and that the error message can be ignored and the installation can complete.

Any help is welcomed!

Thanks,

Mark

   

(mysql): ALTER TABLE mdl_assignment_submissions COMMENT='Info about submitted assignments'
Success

(mysql): INSERT INTO mdl_log_display(module, action, mtable, field) VALUES ('assignment', 'view', 'assignment', 'name')
Success

(mysql): INSERT INTO mdl_log_display(module, action, mtable, field) VALUES ('assignment', 'add', 'assignment', 'name')
Success

(mysql): INSERT INTO mdl_log_display(module, action, mtable, field) VALUES ('assignment', 'update', 'assignment', 'name')
Success

(mysql): INSERT INTO mdl_log_display(module, action, mtable, field) VALUES ('assignment', 'view submission', 'assignment', 'name')
Success

(mysql): INSERT INTO mdl_log_display(module, action, mtable, field) VALUES ('assignment', 'upload', 'assignment', 'name')
Success

assignment tables could NOT be set up successfully!

Average of ratings: -