diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-26 23:38:17 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-26 23:38:17 +0000 |
commit | d097b4fc027ff558bf5f580298c7bed3696dcd3d (patch) | |
tree | af67745f12cdb7ebeeff9b615fbf8ec3f5cd6881 /installer/install.sql | |
parent | 960c4248deb43eb824dda14670ea1f759a709013 (diff) |
Update to image_block based on bharat's feedback
1) move the rand_key column into core
2) don't do a max rand, just try to a get a random number less than
the current random number if that doesn't successd look the other way
Diffstat (limited to 'installer/install.sql')
-rw-r--r-- | installer/install.sql | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/installer/install.sql b/installer/install.sql index 06f2bede..72416653 100644 --- a/installer/install.sql +++ b/installer/install.sql @@ -138,12 +138,14 @@ CREATE TABLE `items` ( `width` int(9) default NULL, `view_1` tinyint(2) NOT NULL default '0', `view_2` tinyint(2) NOT NULL default '0', + `rand_key` float default NULL, PRIMARY KEY (`id`), KEY `parent_id` (`parent_id`), - KEY `type` (`type`) + KEY `type` (`type`), + KEY `random` (`rand_key` DESC) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; SET character_set_client = @saved_cs_client; -INSERT INTO `items` VALUES (NULL,1234232381,'Welcome to your Gallery3',NULL,1,1,1,NULL,NULL,2,0,NULL,NULL,1,2,NULL,NULL,1,'Gallery','album',1234232381,0,NULL,1,1); +INSERT INTO `items` VALUES (NULL,1234232381,'Welcome to your Gallery3',NULL,1,1,1,NULL,NULL,2,0,NULL,NULL,1,2,NULL,NULL,1,'Gallery','album',1234232381,0,NULL,1,1,NULL); DROP TABLE IF EXISTS `items_tags`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; |