 
 
 CREATE TABLE cc_config_group (
-  	id 								INT NOT NULL auto_increment,
+	id 								INT NOT NULL auto_increment,
 	group_title 					VARCHAR(64) NOT NULL,
 	group_description 				VARCHAR(255) NOT NULL,
 	PRIMARY KEY (id)

) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;



ALTER TABLE cc_card ADD restriction TINYINT NOT NULL DEFAULT '0';



ALTER TABLE cc_card DROP COLUMN callback;



-- ADD IAX TRUNKING
ALTER TABLE cc_iax_buddies ADD trunk CHAR(3) DEFAULT 'yes';



-- Refactor Agent Section
ALTER TABLE cc_card DROP id_agent;
ALTER TABLE cc_card_group ADD id_agent INT NOT NULL DEFAULT '0';



ALTER TABLE cc_card DROP template_invoice;
ALTER TABLE cc_card DROP template_outstanding;

ALTER TABLE cc_card CHANGE VAT_RN vat_rn VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
 

-- add amount
ALTER TABLE cc_phonenumber ADD amount INT NOT NULL DEFAULT '0';

	PRIMARY KEY  (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

ALTER TABLE cc_call_archive ADD INDEX ( username );
ALTER TABLE cc_call_archive ADD INDEX ( starttime );
ALTER TABLE cc_call_archive ADD INDEX ( terminatecause );
ALTER TABLE cc_call_archive ADD INDEX ( calledstation );



