ALTER table account add `postlabels` varchar(255) NOT NULL default '';
ALTER table account add `posturl` varchar(255) NOT NULL default '';
ALTER table account add `posttitle` varchar(255) NOT NULL default '';
ALTER table account add `gaccounts` text NOT NULL default '';
ALTER table account add `adcodeid` int(11) NOT NULL default '0';
ALTER table account add `adchanelid` int(11) NOT NULL default '0';

#we create adchanel table
DROP TABLE IF EXISTS `adchanel`;
CREATE TABLE `adchanel` (
  `adchanel_id` int(11) NOT NULL auto_increment,
  `adchanel` varchar(10) NOT NULL default '',
  PRIMARY KEY  (`adchanel_id`)
);


#we create adcode table
DROP TABLE IF EXISTS `adcode`;
CREATE TABLE `adcode` (
  `adcode_id` int(11) NOT NULL auto_increment,
  `adcode` varchar(18) NOT NULL default '',
  PRIMARY KEY  (`adcode_id`)
);

#we update and remove adchanel field from account table
#INSERT INTO adchanel (adchanel) SELECT DISTINCT adchanel FROM account;
#UPDATE account,adchanel SET account.adchanelid=adchanel.adchanel_id WHERE account.adchanel=adchanel.adchanel;
ALTER TABLE account DROP adchanel;

#we update and remove adcode field from account table
#INSERT INTO adcode (adcode) SELECT DISTINCT adcode FROM account;
#UPDATE account,adcode SET account.adcodeid=adcode.adcode_id WHERE account.adcode=adcode.adcode;
ALTER TABLE account DROP adcode;

#altering comments table
ALTER table comments add `commentformmessage` text NOT NULL default '';
ALTER table comments add `enablecommentmoderation` tinyint(1) NOT NULL default '0';


#altering mysqlinfo table
ALTER table mysqlinfo add `useftpinfo` tinyint(4) NOT NULL default '0';


#create a plugins table
DROP TABLE IF EXISTS `plugins`;
CREATE TABLE `plugins` (
  `pl_id` int(11) NOT NULL auto_increment,
  `id` int(11) NOT NULL default '0',
  `plugins` text NOT NULL,
  PRIMARY KEY  (`pl_id`)
);

#altering publish table
ALTER table publish add `feedfilename` varchar(255) NOT NULL default '';
ALTER table publish add  `multiplydomains` tinyint(1) NOT NULL default '0';


#altering template table
ALTER TABLE `template` CHANGE `navbar` `navbar` VARCHAR( 16 ) NOT NULL DEFAULT 'DISABLED';


















