Ignore:
Timestamp:
Jun 26, 2013, 12:09:21 AM (11 years ago)
Author:
mistic100
Message:

many corrections & optimizations + remove useless code + clean

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserCollections/include/install.inc.php

    r20090 r23551  
    2424  `name` varchar(255) NOT NULL,
    2525  `date_creation` datetime NOT NULL,
     26  `comment` text NULL,
    2627  `nb_images` mediumint(8) NOT NULL DEFAULT 0,
    27   `active` tinyint(1) DEFAULT 0,
    2828  `public` tinyint(1) DEFAULT 0,
    2929  `public_id` varchar(10) NULL,
     
    4848    pwg_query('ALTER TABLE `'.$prefixeTable.'collection_images` ADD `add_date` DATETIME NULL;');
    4949  }
     50 
     51  $result = pwg_query('SHOW COLUMNS FROM `'.$prefixeTable.'collections` LIKE "comment";');
     52  if (!pwg_db_num_rows($result))
     53  {
     54    pwg_query('ALTER TABLE `'.$prefixeTable.'collections` ADD `comment` TEXT NULL;');
     55    pwg_query('ALTER TABLE `'.$prefixeTable.'collections` DROP `active`;');
     56  }
    5057}
    5158
Note: See TracChangeset for help on using the changeset viewer.