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
00036 $installer = $this;
00037
00038
00039 $installer->startSetup();
00040 $installer->run("
00041
00042 -- DROP TABLE IF EXISTS `{$installer->getTable('dataflow_batch_import')}`;
00043 -- DROP TABLE IF EXISTS `{$installer->getTable('dataflow_batch_export')}`;
00044 -- DROP TABLE IF EXISTS `{$installer->getTable('dataflow_batch')}`;
00045
00046 CREATE TABLE `{$installer->getTable('dataflow_batch')}` (
00047 `batch_id` int(10) unsigned NOT NULL auto_increment,
00048 `profile_id` int(10) unsigned NOT NULL default '0',
00049 `store_id` smallint(5) unsigned NOT NULL default '0',
00050 `adapter` varchar(128) default NULL,
00051 `created_at` datetime default NULL,
00052 PRIMARY KEY (`batch_id`),
00053 KEY `FK_DATAFLOW_BATCH_PROFILE` (`profile_id`),
00054 KEY `FK_DATAFLOW_BATCH_STORE` (`store_id`),
00055 KEY `IDX_CREATED_AT` (`created_at`),
00056 CONSTRAINT `FK_DATAFLOW_BATCH_PROFILE` FOREIGN KEY (`profile_id`) REFERENCES `{$installer->getTable('dataflow_profile')}` (`profile_id`) ON DELETE CASCADE,
00057 CONSTRAINT `FK_DATAFLOW_BATCH_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$installer->getTable('core_store')}` (`store_id`) ON DELETE CASCADE
00058 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00059
00060 CREATE TABLE `{$installer->getTable('dataflow_batch_export')}` (
00061 `batch_export_id` bigint(20) unsigned NOT NULL auto_increment,
00062 `batch_id` int(10) unsigned NOT NULL default '0',
00063 `batch_data` longtext,
00064 `status` tinyint(3) unsigned NOT NULL default '0',
00065 PRIMARY KEY (`batch_export_id`),
00066 KEY `FK_DATAFLOW_BATCH_EXPORT_BATCH` (`batch_id`),
00067 CONSTRAINT `FK_DATAFLOW_BATCH_EXPORT_BATCH` FOREIGN KEY (`batch_id`) REFERENCES `{$installer->getTable('dataflow_batch')}` (`batch_id`) ON DELETE CASCADE
00068 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00069
00070 CREATE TABLE `{$installer->getTable('dataflow_batch_import')}` (
00071 `batch_import_id` bigint(20) unsigned NOT NULL auto_increment,
00072 `batch_id` int(10) unsigned NOT NULL default '0',
00073 `batch_data` longtext,
00074 `status` tinyint(3) unsigned NOT NULL default '0',
00075 PRIMARY KEY (`batch_import_id`),
00076 KEY `FK_DATAFLOW_BATCH_IMPORT_BATCH` (`batch_id`),
00077 CONSTRAINT `FK_DATAFLOW_BATCH_IMPORT_BATCH` FOREIGN KEY (`batch_id`) REFERENCES `{$installer->getTable('dataflow_batch')}` (`batch_id`) ON DELETE CASCADE
00078 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00079 ");
00080 $installer->endSetup();