ALTER TABLE  `news` ADD  `link` VARCHAR( 255 ) NULL AFTER  `pub_date`;

UPDATE  `items` SET  `description` =  'Università e Dipartimenti' WHERE  `items`.`id` =4;

ALTER TABLE  `news` ADD  `flag_home` TINYINT( 1 ) NULL DEFAULT  '0' AFTER  `link`;

CREATE TABLE IF NOT EXISTS `attachments_teachers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `attachment_id` int(11) unsigned NOT NULL,
  `teacher_id` int(11) NOT NULL,
  `is_predefined` tinyint(1) unsigned DEFAULT NULL,
  `description` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `attachment_id` (`attachment_id`),
  KEY `teacher_id` (`teacher_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Limiti per le tabelle scaricate
--

--
-- Limiti per la tabella `attachments_teachers`
--
ALTER TABLE `attachments_teachers`
  ADD CONSTRAINT `attachments_teachers_ibfk_2` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `attachments_teachers_ibfk_1` FOREIGN KEY (`attachment_id`) REFERENCES `attachments` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

/**** FATTO ***/

ALTER TABLE  `news` ADD  `event_date` DATE NULL AFTER  `pub_date`;

ALTER TABLE  `news` ADD  `flag_event` TINYINT( 1 ) NULL DEFAULT  '0' AFTER  `flag_home`;

/*** FATTO ***/
