00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 $installer = $this;
00036
00037
00038 $installer->startSetup();
00039
00040 $installer->run("
00041 ALTER TABLE {$this->getTable('review_detail')}
00042 CHANGE `store_id` `store_id` smallint(5) unsigned NULL DEFAULT '0';
00043 ALTER TABLE {$this->getTable('review_detail')}
00044 ADD CONSTRAINT `FK_REVIEW_DETAIL_STORE` FOREIGN KEY (`store_id`)
00045 REFERENCES {$this->getTable('core_store')} (`store_id`)
00046 ON UPDATE CASCADE
00047 ON DELETE SET NULL;
00048 ");
00049 $installer->run("
00050 ALTER TABLE {$this->getTable('review_entity_summary')}
00051 ADD CONSTRAINT `FK_REVIEW_ENTITY_SUMMARY_STORE` FOREIGN KEY (`store_id`)
00052 REFERENCES {$this->getTable('core_store')} (`store_id`)
00053 ON UPDATE CASCADE
00054 ON DELETE CASCADE;
00055 ");
00056 $installer->run("
00057 ALTER TABLE {$this->getTable('review_store')}
00058 ADD CONSTRAINT `FK_REVIEW_STORE_STORE` FOREIGN KEY (`store_id`)
00059 REFERENCES {$this->getTable('core_store')} (`store_id`)
00060 ON UPDATE CASCADE
00061 ON DELETE CASCADE;
00062 ");
00063 $installer->endSetup();