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 $installer = $this;
00028 
00029 
00030 $installer->startSetup();
00031 
00032 $installer->run("
00033 ALTER TABLE {$this->getTable('cms_block')}
00034     CHANGE `store_id` `store_id` smallint(5) unsigned NULL DEFAULT '0';
00035 ALTER TABLE {$this->getTable('cms_block')}
00036     ADD CONSTRAINT `FK_CMS_BLOCK_STORE` FOREIGN KEY (`store_id`)
00037     REFERENCES {$this->getTable('core_store')} (`store_id`)
00038         ON UPDATE CASCADE
00039         ON DELETE SET NULL;
00040 ");
00041 $installer->run("
00042 ALTER TABLE {$this->getTable('cms_page')}
00043     CHANGE `store_id` `store_id` smallint(5) unsigned NULL DEFAULT '0';
00044 ALTER TABLE {$this->getTable('cms_page')}
00045     ADD CONSTRAINT `FK_CMS_PAGE_STORE` FOREIGN KEY (`store_id`)
00046     REFERENCES {$this->getTable('core_store')} (`store_id`)
00047         ON UPDATE CASCADE
00048         ON DELETE SET NULL;
00049 ");
00050 
00051 $installer->endSetup();