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 $installer->run("
00040 ALTER TABLE {$this->getTable('report_event')}
00041 DROP INDEX `event_type_id`,
00042 ADD INDEX `IDX_EVENT_TYPE` (`event_type_id`);
00043 ALTER TABLE {$this->getTable('report_event')}
00044 ADD CONSTRAINT `FK_REPORT_EVENT_TYPE` FOREIGN KEY (`event_type_id`)
00045 REFERENCES {$this->getTable('report_event_types')} (`event_type_id`)
00046 ON UPDATE CASCADE
00047 ON DELETE CASCADE;
00048 ALTER TABLE {$this->getTable('report_event')}
00049 DROP INDEX `subject_id`,
00050 ADD INDEX `IDX_SUBJECT` (`subject_id`);
00051 ALTER TABLE {$this->getTable('report_event')}
00052 DROP INDEX `object_id`,
00053 ADD INDEX `IDX_OBJECT` (`object_id`);
00054 ALTER TABLE {$this->getTable('report_event')}
00055 DROP INDEX `subtype`,
00056 ADD INDEX `IDX_SUBTYPE` (`subtype`);
00057 ALTER TABLE {$this->getTable('report_event')}
00058 DROP INDEX `store_id`;
00059 ALTER TABLE {$this->getTable('report_event')}
00060 CHANGE `store_id` `store_id` smallint(5) unsigned NOT NULL;
00061 ALTER TABLE {$this->getTable('report_event')}
00062 ADD CONSTRAINT `FK_REPORT_EVENT_STORE` FOREIGN KEY (`store_id`)
00063 REFERENCES {$this->getTable('core_store')} (`store_id`)
00064 ON UPDATE CASCADE
00065 ON DELETE CASCADE;
00066 ");
00067 $installer->endSetup();