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 $installer = $this;
00029
00030
00031 $installer->startSetup();
00032
00033 $installer->getConnection()->dropForeignKey(
00034 $installer->getTable('catalog/product_website'),
00035 'FK_CATALOG_PRODUCT_WEBSITE_PRODUCT'
00036 );
00037 $installer->getConnection()->dropForeignKey(
00038 $installer->getTable('catalog/product_website'),
00039 'FK_CATAOLOG_PRODUCT_WEBSITE_WEBSITE'
00040 );
00041 $installer->getConnection()->dropForeignKey(
00042 $installer->getTable('catalog/product_website'),
00043 'FK_CATALOG_PRODUCT_WEBSITE_WEBSITE'
00044 );
00045 $installer->getConnection()->dropKey(
00046 $installer->getTable('catalog/product_website'),
00047 'FK_CATAOLOG_PRODUCT_WEBSITE_WEBSITE'
00048 );
00049 $installer->getConnection()->dropKey(
00050 $installer->getTable('catalog/product_website'),
00051 'FK_CATALOG_PRODUCT_WEBSITE_WEBSITE'
00052 );
00053 $installer->getConnection()->addConstraint('FK_SUPER_PRODUCT_ATTRIBUTE_LABEL',
00054 $installer->getTable('catalog/product_super_attribute_label'), 'product_super_attribute_id',
00055 $installer->getTable('catalog/product_super_attribute'), 'product_super_attribute_id',
00056 'CASCADE', 'CASCADE', true);
00057 $installer->getConnection()->addConstraint('FK_SUPER_PRODUCT_ATTRIBUTE_PRICING',
00058 $installer->getTable('catalog/product_super_attribute_pricing'), 'product_super_attribute_id',
00059 $installer->getTable('catalog/product_super_attribute'), 'product_super_attribute_id',
00060 'CASCADE', 'CASCADE', true);
00061 $installer->getConnection()->addConstraint('FK_SUPER_PRODUCT_LINK_ENTITY',
00062 $installer->getTable('catalog/product_super_link'), 'product_id',
00063 $installer->getTable('catalog/product'), 'entity_id',
00064 'CASCADE', 'CASCADE', true);
00065 $installer->getConnection()->addConstraint('FK_SUPER_PRODUCT_LINK_PARENT',
00066 $installer->getTable('catalog/product_super_link'), 'parent_id',
00067 $installer->getTable('catalog/product'), 'entity_id',
00068 'CASCADE', 'CASCADE', true);
00069 $installer->getConnection()->addConstraint('FK_CATALOG_PRODUCT_WEBSITE_WEBSITE',
00070 $installer->getTable('catalog/product_website'), 'website_id',
00071 $installer->getTable('core/website'), 'website_id',
00072 'CASCADE', 'CASCADE', true);
00073 $installer->getConnection()->addConstraint('FK_CATALOG_WEBSITE_PRODUCT_PRODUCT',
00074 $installer->getTable('catalog/product_website'), 'product_id',
00075 $installer->getTable('catalog/product'), 'entity_id',
00076 'CASCADE', 'CASCADE', true);
00077 $installer->endSetup();