Temporary fixes for php encoding library bugs ending with segfault.
[fa-stable.git] / sql / alter2.2.sql
index 441c9ba65855d108c004c2ff33c950b8c4e4ce74..a08cc39761a45209fda815e670f40bea18c04acf 100644 (file)
@@ -124,11 +124,21 @@ CREATE TABLE `0_tags` (
 DROP TABLE IF EXISTS `0_tag_associations`;
 
 CREATE TABLE `0_tag_associations` (
-  `id` int(11) NOT NULL auto_increment,
   `record_id` varchar(11) NOT NULL,
   `tag_id` int(11) NOT NULL,
-  PRIMARY KEY  (`id`)
-) TYPE=MyISAM AUTO_INCREMENT=1;
+  UNIQUE KEY(`record_id`,`tag_id`)
+) TYPE=MyISAM;
+
+DROP TABLE IF EXISTS `0_useronline` ;
+
+CREATE TABLE `0_useronline` (
+       `id` int(11) NOT NULL AUTO_INCREMENT ,
+       `timestamp` int(15) NOT NULL default '0',
+       `ip` varchar(40) NOT NULL default '',
+       `file` varchar(100) NOT NULL default '',
+       PRIMARY KEY `id` (`id`) ,
+       KEY (`timestamp`) 
+) TYPE=MYISAM AUTO_INCREMENT=1;
 
 ALTER TABLE `0_suppliers` ADD COLUMN `phone2` varchar(30) NOT NULL default '' AFTER `phone`;
 ALTER TABLE `0_cust_branch` ADD COLUMN `phone2` varchar(30) NOT NULL default '' AFTER `phone`;