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
00042 -- DROP TABLE IF EXISTS {$this->getTable('report_event_types')};
00043 CREATE TABLE {$this->getTable('report_event_types')} (
00044 `event_type_id` smallint(6) unsigned NOT NULL auto_increment,
00045 `event_name` varchar(32) NOT NULL,
00046 PRIMARY KEY (`event_type_id`),
00047 KEY `event_type_id` (`event_type_id`)
00048 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00049
00050 INSERT INTO {$this->getTable('report_event_types')} VALUES
00051 (1, 'catalog_product_view'),
00052 (2, 'sendfriend_product'),
00053 (3, 'catalog_product_compare_add_product'),
00054 (4, 'checkout_cart_add_product'),
00055 (5, 'wishlist_add_product'),
00056 (6, 'wishlist_share');
00057
00058 -- DROP TABLE IF EXISTS {$this->getTable('report_event')};
00059 CREATE TABLE {$this->getTable('report_event')} (
00060 `event_id` bigint(20) unsigned NOT NULL auto_increment,
00061 `logged_at` datetime NOT NULL default '0000-00-00 00:00:00',
00062 `event_type_id` smallint(6) unsigned NOT NULL default '0',
00063 `object_id` int(10) unsigned NOT NULL default '0',
00064 `subject_id` int(10) unsigned NOT NULL default '0',
00065 `store_id` tinyint(3) unsigned NOT NULL default '0',
00066 PRIMARY KEY (`event_id`),
00067 KEY `subject_id` (`subject_id`),
00068 KEY `object_id` (`object_id`)
00069 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00070
00071 ");
00072
00073 $installer->endSetup();