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
00034 -- DROP TABLE IF EXISTS {$this->getTable('catalogsearch_query')};
00035 CREATE TABLE {$this->getTable('catalogsearch_query')} (
00036 `query_id` int(10) unsigned NOT NULL auto_increment,
00037 `query_text` varchar(255) NOT NULL default '',
00038 `num_results` int(10) unsigned NOT NULL default '0',
00039 `popularity` int(10) unsigned NOT NULL default '0',
00040 `redirect` varchar(255) NOT NULL default '',
00041 `synonim_for` varchar(255) NOT NULL default '',
00042 `store_id` smallint (5) unsigned NOT NULL,
00043 PRIMARY KEY (`query_id`),
00044 KEY `search_query` (`query_text`,`popularity`),
00045 KEY `FK_catalogsearch_query` (`store_id`),
00046 CONSTRAINT `FK_catalogsearch_query` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00047 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00048
00049 ");
00050
00051 $installer->endSetup();