 

ALTER TABLE `i3l_entidades` CHANGE `i3l_id` `id` CHAR( 8 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;

CREATE TABLE i3l_derivaciones (
  `id` int(10) unsigned NOT NULL auto_increment,
  `centro_origen` tinyint(2) unsigned NOT NULL default '0',
  `idusuario` mediumint(8) unsigned NOT NULL default '0',
  `fecha` date NOT NULL default '0000-00-00',
  `id_entidad` char(8) NOT NULL default '',
  `motivo` text NOT NULL,
  `tipo_motivo` char(2) NOT NULL,
  `id_prov` char(2) NOT NULL,
  `id_loc` char(5) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;
