Changeset 2000


Ignore:
Timestamp:
06/22/10 15:23:02 (3 years ago)
Author:
shibuya246
Message:

[Branch 1.4] change post_title column from navchar to text

Location:
branches/1.4/install
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4/install/install-upgrade.php

    r1989 r2000  
    685685            // Add index for siteid on pluginhooks table 
    686686            $sql = "SHOW INDEX FROM `" . TABLE_PLUGINHOOKS . "` WHERE KEY_NAME = 'pluginhooks_siteid'"; 
    687                     $result = $h->db->query($sql); 
    688                     if (!$result) { 
    689                             $sql = "ALTER TABLE `" . TABLE_PLUGINHOOKS . "` ADD INDEX (pluginhooks_siteid)"; 
    690                             $h->db->query($sql); 
    691                     } 
     687            $result = $h->db->query($sql); 
     688            if (!$result) { 
     689                    $sql = "ALTER TABLE `" . TABLE_PLUGINHOOKS . "` ADD INDEX (pluginhooks_siteid)"; 
     690                    $h->db->query($sql); 
     691            } 
     692 
     693            // Change post_title column from `post_title` varchar(255) NULL, to `post_title` text NULL, 
     694            $exists = $h->db->column_exists('posts', 'post_title'); 
     695            if (!$exists) { 
     696                    $sql = "ALTER TABLE " . TABLE_POSTS . " MODIFY post_title text NUL"; 
     697                    $h->db->query($h->db->prepare($sql)); 
     698            } 
    692699 
    693700        } 
  • branches/1.4/install/install_tables.php

    r1968 r2000  
    300300                        `post_category` int(20) NOT NULL DEFAULT 1, 
    301301                        `post_tags` text NULL, 
    302                         `post_title` varchar(255) NULL,  
     302                        `post_title` text NULL, 
    303303                        `post_orig_url` varchar(255) NULL,  
    304304                        `post_domain` varchar(255) NULL,  
Note: See TracChangeset for help on using the changeset viewer.