--ALTER TABLE `proposals_sentences` ADD `history_id` INT NULL; -- see update 0025

ALTER TABLE `amendments` ADD `history_id` INT NULL;

CREATE  TABLE `CIA2update` (  
 `id` int( 11  )  NOT  NULL  AUTO_INCREMENT ,
 `proposal_id` int( 11  )  NOT  NULL ,
 `change_type` varchar( 16  )  NOT  NULL ,
 `sentence_id` int( 11  )  DEFAULT NULL ,
 `jc_comment` varchar( 1000  )  DEFAULT NULL ,
 `abs_order` int( 11  )  NOT  NULL ,
 `category` varchar( 32  )  NOT  NULL ,
 `title` varchar( 128  )  NOT  NULL ,
 `order` smallint( 6  )  NOT  NULL ,
 `last_change` varchar( 255  )  DEFAULT NULL ,
 `title2` varchar( 128  )  DEFAULT NULL ,
 `order2` smallint( 6  )  DEFAULT NULL ,
 `article` smallint( 6  )  NOT  NULL ,
 `article_title` varchar( 128  )  DEFAULT NULL ,
 `paragraph` smallint( 6  )  NOT  NULL ,
 `sentence` smallint( 6  )  NOT  NULL ,
 `sentence_text` varchar( 5000  )  NOT  NULL ,
 `agora_id_start` smallint( 6  )  NOT  NULL ,
 `agora_id_end` smallint( 6  )  NOT  NULL ,
 `title_status` varchar( 16  )  DEFAULT NULL ,
 `title2_status` varchar( 16  )  DEFAULT NULL ,
 `article_title_status` varchar( 16  )  DEFAULT NULL ,
 `paragraph_status` varchar( 16  )  DEFAULT NULL ,
 `history_id` int( 11  )  DEFAULT NULL ,
 PRIMARY  KEY (  `id`  )  
) ENGINE  =  MyISAM  DEFAULT CHARSET  = utf8;


--
-- Table structure for table `notifications`
--

CREATE TABLE `notifications` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `agora_id` int(11) NOT NULL,
  `uid` varchar(100) NOT NULL,
  `type` ENUM( 'Proposal', 'Rollcall', 'Election' ) NULL DEFAULT NULL,
  `rid` int(11) DEFAULT NULL,
  `open` datetime DEFAULT NULL,
  `close` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

