Location: PHPKode > projects > Content*Builder > contentbuilder/system/setup/updates/update_065.php
<?php

// start 0.6.5 Community & Newsletter & Multiple Folder
	$sql = "CREATE TABLE ".TABLE."_art_folder (";
	$sql .= "  articleID int(10) unsigned NOT NULL default '0',";
	$sql .= "  folderID int(10) unsigned NOT NULL default '0',";
	$sql .= "  PRIMARY KEY  (articleID,folderID)";
	$sql .= ") TYPE=MyISAM;";
	mysql_query($sql);
	
	$sql = "CREATE TABLE ".TABLE."_community_activation (";
	$sql .= "  userID int(10) unsigned NOT NULL default '0',";
	$sql .= "  activationCode varchar(32) NOT NULL default '',";
	$sql .= "  datetime datetime NOT NULL default '0000-00-00 00:00:00',";
	$sql .= "  PRIMARY KEY  (userID)";
	$sql .= ") TYPE=MyISAM;";
	mysql_query($sql);
	
	$sql = "CREATE TABLE ".TABLE."_community_user (";
	$sql .= "  userID int(10) unsigned NOT NULL auto_increment,";
	$sql .= "  name varchar(50) NOT NULL default '',";
	$sql .= "  fullname varchar(50) NOT NULL default '',";
	$sql .= "  password varchar(32) NOT NULL default '',";
	$sql .= "  registerDate datetime NOT NULL default '0000-00-00 00:00:00',";
	$sql .= "  lastLogin datetime NOT NULL default '0000-00-00 00:00:00',";
	$sql .= "  email varchar(100) NOT NULL default '',";
	$sql .= "  options bigint(10) unsigned NOT NULL default '0',";
	$sql .= "  PRIMARY KEY  (userID),";
	$sql .= "  UNIQUE KEY name (name)";
	$sql .= ") TYPE=MyISAM;";
	mysql_query($sql);
	
	$sql = "CREATE TABLE ".TABLE."_nl_category (";
	$sql .= "  userID varchar(32) NOT NULL default '',";
	$sql .= "  categoryID int(10) unsigned NOT NULL auto_increment,";
	$sql .= "  name varchar(255) NOT NULL default '',";
	$sql .= "  description text NOT NULL,";
	$sql .= "  options int(10) unsigned NOT NULL default '0',";
	$sql .= "  datetime datetime NOT NULL default '0000-00-00 00:00:00',";
	$sql .= "  PRIMARY KEY  (categoryID)";
	$sql .= ") TYPE=MyISAM;";
	mysql_query($sql);
	
	$sql = "CREATE TABLE ".TABLE."_nl_content (";
	$sql .= "  userID varchar(32) NOT NULL default '',";
	$sql .= "  newsletterID int(10) unsigned NOT NULL default '0',";
	$sql .= "  typeID int(10) unsigned NOT NULL default '0',";
	$sql .= "  text text NOT NULL,";
	$sql .= "  PRIMARY KEY  (newsletterID,typeID),";
	$sql .= "  FULLTEXT KEY text (text)";
	$sql .= ") TYPE=MyISAM;";
	mysql_query($sql);
	
	$sql = "CREATE TABLE ".TABLE."_nl_general (";
	$sql .= "  userID varchar(32) NOT NULL default '',";
	$sql .= "  newsletterID int(10) unsigned NOT NULL auto_increment,";
	$sql .= "  categoryID int(10) unsigned NOT NULL default '0',";
	$sql .= "  templateID INT(10) UNSIGNED NOT NULL,"; 
	$sql .= "  title varchar(255) NOT NULL default '',";
	$sql .= "  sendTime datetime NOT NULL default '0000-00-00 00:00:00',";
	$sql .= "  options int(10) unsigned NOT NULL default '0',";
	$sql .= "  PRIMARY KEY  (newsletterID)";
	$sql .= ") TYPE=MyISAM;";
	mysql_query($sql);
	
	$sql = "CREATE TABLE ".TABLE."_nl_subscription (";
	$sql .= "  userID int(10) unsigned NOT NULL default '0',";
	$sql .= "  categoryID int(10) unsigned NOT NULL default '0',";
	$sql .= "  typeID int(10) unsigned NOT NULL default '1',";
	$sql .= "  PRIMARY KEY  (userID,categoryID),";
	$sql .= "  KEY categoryID (categoryID)";
	$sql .= ") TYPE=MyISAM;";
	mysql_query($sql);
	
	mysql_query("INSERT INTO ".TABLE."_options (name, value, module, parameter) VALUES ('defaultEditor', '3', 'system', '');");
	mysql_query("INSERT INTO ".TABLE."_options (name, value, module, parameter) VALUES ('sortMethod', '1', 'art', '');");
	mysql_query("INSERT INTO ".TABLE."_options (name, value, module, parameter) VALUES ('from', 'hide@address.com', 'newsletter', '');");
	mysql_query("INSERT INTO ".TABLE."_options (name, value, module, parameter) VALUES ('requireUserActivation', '1', 'community', '');");
	mysql_query("INSERT INTO ".TABLE."_options (name, value, module, parameter) VALUES ('sendMethod', 'mail', 'newsletter', '');");
	
	mysql_query("ALTER TABLE ".TABLE."_columns CHANGE leftID leftID INT(10) UNSIGNED DEFAULT '1' NOT NULL");
	mysql_query("ALTER TABLE ".TABLE."_columns CHANGE rightID rightID INT(10) UNSIGNED DEFAULT '2' NOT NULL");
	mysql_query("ALTER TABLE ".TABLE."_columns CHANGE level level INT(10) UNSIGNED DEFAULT '1' NOT NULL");
// end 0.6.5 Community & Newsletter

?>
Return current item: Content*Builder