Sorry if this has already been posted, I didn't see it on the first page anywhere, and since it is still a problem in the most recent version, I figured I should bring it up. I ran a check on my database tables using the Schema module and it brings up the following mismatch errors for the legal tables. This is because the tables have been declared in the .install file incorrectly, so it results in a mismatch when the tables are created. You could try

*
legal_accepted
o column legal_id:
declared: array('type' => 'serial', 'unsigned' => FALSE, 'not null' => TRUE)
actual: array('type' => 'serial', 'not null' => TRUE, 'disp-width' => '11')
o column uid:
declared: array('type' => 'int', 'unsigned' => FALSE, 'not null' => TRUE, 'default' => 0)
actual: array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11')
o column tc_id:
declared: array('type' => 'int', 'unsigned' => FALSE, 'not null' => TRUE, 'default' => 0)
actual: array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11')
o column accepted:
declared: array('type' => 'int', 'unsigned' => FALSE, 'not null' => TRUE, 'default' => 0)
actual: array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11')
*
legal_conditions
o column tc_id:
declared: array('type' => 'serial', 'unsigned' => FALSE, 'not null' => TRUE)
actual: array('type' => 'serial', 'not null' => TRUE, 'disp-width' => '11')
o column date:
declared: array('type' => 'int', 'unsigned' => FALSE, 'not null' => TRUE, 'default' => 0)
actual: array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11')
o column extras: key 'not null' not set, ignoring inspected default value
o column changes: key 'not null' not set, ignoring inspected default value

The legal.install should be changed from:

$schema['legal_accepted'] = array(
    'fields' => array(
    	'legal_id'  => array('type' => 'serial', 'unsigned' => FALSE, 'not null' => TRUE, 'disp-width' => 10),
    	'uid'       => array('type' => 'int', 'unsigned' => FALSE, 'not null' => TRUE, 'default' => 0, 'disp-width' => 10),
    	'tc_id'     => array('type' => 'int', 'unsigned' => FALSE, 'not null' => TRUE, 'default' => 0, 'disp-width' => 10),
    	'accepted'  => array('type' => 'int', 'unsigned' => FALSE, 'not null' => TRUE, 'default' => 0, 'disp-width' => 11),
    ),
    'indexes' => array('uid' => array('uid')),
    'primary key' => array('legal_id'),
  );
$schema['legal_conditions'] = array(
    'fields' => array(
    	'tc_id'       => array('type' => 'serial', 'unsigned' => FALSE, 'not null' => TRUE, 'disp-width' => 10),
    	'conditions'  => array('type' => 'text', 'size' => 'big', 'not null' => TRUE),
    	'date'        => array('type' => 'int', 'unsigned' => FALSE, 'not null' => TRUE, 'default' => 0, 'disp-width' => 11),
    	'extras'      => array('type' => 'text'),
    	'changes'     => array('type' => 'text'),
    ),
    'primary key' => array('tc_id'),
  );

TO:

$schema['legal_accepted'] = array(
    'fields' => array(
         'legal_id' => array('type' => 'serial', 'not null' => TRUE, 'disp-width' => '11'),
         'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11'),
         'tc_id' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11'),
         'accepted' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11')),
    'primary key' => array('legal_id'),
    'indexes' => array(
         'uid' => array('uid')),
);
$schema['legal_conditions'] = array(
    'fields' => array(
         'tc_id' => array('type' => 'serial', 'not null' => TRUE, 'disp-width' => '11'),
         'conditions' => array('type' => 'text', 'size' => 'big', 'not null' => TRUE),
         'date' => array('type' => 'int', 'not null' => TRUE, 'default' => 0, 'disp-width' => '11'),
         'extras' => array('type' => 'text', 'not null' => FALSE),
         'changes' => array('type' => 'text', 'not null' => FALSE)),
    'primary key' => array('tc_id'),
);

I hope this post was helpful. It's not a major deal, but would be nice to stop getting the error on my screen because of the mismatch. I already changed my legal.install, and it fixed the error.

Comments

Anonymous’s picture

Status: Active » Fixed

Just installed the legal module and the schema module reports no mismatch.

Best,
Paul Booker
Appcoast

Anonymous’s picture

Assigned: Unassigned »

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.