ALTER TABLE `nas` CHANGE `enableapi` `coamode` TINYINT( 1 ) NOT NULL ;

CREATE TABLE `rm_dailyacct` (
  `radacctid` bigint(21) NOT NULL,
  `acctuniqueid` varchar(32) NOT NULL,
  `username` varchar(64) NOT NULL,
  `acctstarttime` datetime NOT NULL,
  `acctstoptime` datetime NOT NULL,
  `acctsessiontime` int(12) NOT NULL,
  `dlbytesstart` bigint(20) NOT NULL,
  `dlbytesstop` bigint(20) NOT NULL,
  `dlbytes` bigint(20) NOT NULL,
  `ulbytesstart` bigint(20) NOT NULL,
  `ulbytesstop` bigint(20) NOT NULL,
  `ulbytes` bigint(20) NOT NULL,
  KEY `radacctid` (`radacctid`),
  KEY `acctuniqueid` (`acctuniqueid`),
  KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `rm_managers` ADD `perm_email` TINYINT( 1 ) NOT NULL AFTER `perm_cts` ,
ADD `perm_sms` TINYINT( 1 ) NOT NULL AFTER `perm_email` ;

ALTER TABLE `rm_phpsess` CHANGE `closed` `closed` TINYINT( 1 ) NOT NULL DEFAULT '0' ;

ALTER TABLE `rm_services` CHANGE `custattr` `custattr` VARCHAR( 10240 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;
ALTER TABLE `rm_services` CHANGE `resetcounters` `resetctrdate` TINYINT( 1 ) NOT NULL ;
ALTER TABLE `rm_services` ADD `resetctrneg` TINYINT( 1 ) NOT NULL AFTER `resetctrdate` ;

ALTER TABLE `rm_settings` ADD `expalertmode` TINYINT( 1 ) NOT NULL AFTER `warnexpiry` ;
ALTER TABLE `rm_settings` ADD `pm_citrus` TINYINT( 1 ) NOT NULL AFTER `pm_payfast` ;
ALTER TABLE `rm_settings` ADD `defgrpid` INT NOT NULL , ADD `captcha` TINYINT( 1 ) NOT NULL ;
ALTER TABLE `rm_settings` ADD `disconnpostpaid` TINYINT( 1 ) NOT NULL AFTER `billingstart` ;

ALTER TABLE `rm_users` CHANGE `custattr` `custattr` VARCHAR( 10240 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;
