wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r9791: LJSUP-7505. Userheads tip-box limitation

Committer: gprochaev
LJSUP-7505. Userheads tip-box limitation

U   trunk/bin/upgrading/update-db-local.pl
Modified: trunk/bin/upgrading/update-db-local.pl
===================================================================
--- trunk/bin/upgrading/update-db-local.pl	2010-12-03 05:42:24 UTC (rev 9790)
+++ trunk/bin/upgrading/update-db-local.pl	2010-12-03 08:31:39 UTC (rev 9791)
@@ -1219,7 +1219,10 @@
 CREATE TABLE `shop_userheads` (
   `uh_id` int(10) unsigned NOT NULL auto_increment,
   `uh_author` varchar(15) default NULL,
+  `uh_desc` varchar(200) default '',
+  `uh_desc_sup` varchar(200) default NULL,
   `price` float(5,2) default '0.00',
+  `visibility` char(1) NOT NULL default 'D',
   `is_enabled` tinyint(4) default '0',
   `img_src` varchar(200) NOT NULL,
   PRIMARY KEY  (`uh_id`)
@@ -2018,9 +2021,24 @@
 
     unless (column_type("shop_userheads", "uh_desc_sup")) {
         do_alter("shop_userheads",
-                "ALTER TABLE shop_userheads ADD visibility CHAR(1) NOT NULL DEFAULT 'D' AFTER price, ADD uh_desc_sup VARCHAR(20) AFTER uh_desc");
+                "ALTER TABLE shop_userheads ADD uh_desc_sup VARCHAR(20) AFTER uh_desc");
     }
 
+    unless (column_type("shop_userheads", "visibility")) {
+        do_alter("shop_userheads",
+                "ALTER TABLE shop_userheads ADD visibility CHAR(1) NOT NULL DEFAULT 'D' AFTER price");
+    }
+
+    unless (column_type("shop_userheads", "uh_desc") =~ /200/) {
+        do_alter("shop_userheads",
+                 "ALTER TABLE shop_userheads MODIFY uh_desc VARCHAR(200) DEFAULT ''");
+    }
+
+    unless (column_type("shop_userheads", "uh_desc_sup") =~ /200/) {
+        do_alter("shop_userheads",
+                 "ALTER TABLE shop_userheads MODIFY uh_desc_sup VARCHAR(200) DEFAULT ''");
+    }
+
     unless (column_type("smsru_phones", "phone") =~ /char/i) {
         do_alter("smsru_phones",
             "ALTER TABLE smsru_phones MODIFY phone VARCHAR(12)");

Tags: ljcom, pl, wisest-owl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments