startSetup(); $installer->run(" CREATE TABLE IF NOT EXISTS `{$installer->getTable('reload_seo/score')}` ( `id` bigint(30) unsigned NOT NULL AUTO_INCREMENT, `type` varchar(50) NOT NULL, `reference_id` bigint(30) unsigned NOT NULL, `score` varchar(50) NOT NULL, `color` varchar(15) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `type` (`type`,`reference_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; CREATE TABLE IF NOT EXISTS `{$installer->getTable('reload_seo/scores_rule')}` ( `id` bigint(30) unsigned NOT NULL AUTO_INCREMENT, `score_id` bigint(30) unsigned NOT NULL, `field` varchar(150) NOT NULL, `title` text NOT NULL, `status` varchar(25) NOT NULL, PRIMARY KEY (`id`), KEY `score_id` (`score_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; ALTER TABLE `{$installer->getTable('reload_seo/score')}` ADD `keywords` VARCHAR( 255 ) NOT NULL ; ALTER TABLE `{$installer->getTable('reload_seo/scores_rule')}` ADD CONSTRAINT `reload_seo_scores_rule_ibfk_1` FOREIGN KEY (`score_id`) REFERENCES `{$installer->getTable('reload_seo/score')}` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; "); $installer->endSetup();