1 UP_SQL = """ 2 CREATE TABLE `server_attributes` ( 3 `id` int(11) NOT NULL auto_increment, 4 `server_id` int(11) DEFAULT NULL, 5 `attribute` varchar(128) DEFAULT NULL, 6 `value` text, 7 `date_modified` timestamp DEFAULT current_timestamp on update current_timestamp, 8 PRIMARY KEY (`id`), 9 KEY `fk_server_attributes_server_idx` (`server_id`), 10 CONSTRAINT `fk_server_attributes_server_server_id` FOREIGN KEY (`server_id`) REFERENCES `servers` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION 11 ); 12 """ 13 14 DOWN_SQL = """ 15 DROP TABLE server_attributes; 16 """