[Asterisk-Users] A2billing with Mysql-5.0.15
Vahan Yerkanian
vahan at arminco.com
Mon Nov 14 02:30:08 MST 2005
Rafael R. GV wrote:
> PS: mysql-schema does not work properly in mysql 5.0.x because only one
> timestamp with default now() in a table its allowed as you told me and
> also I´ve found other issue related to auto_increment value:
>
> ERROR 1064 (42000) at line 87: You have an error in your SQL syntax;
> check the manual that corresponds to your MySQL server version for the
> right syntax to use near 'call (
> id BIGINT NOT NULL AUTO_INCREMENT,
> sessionid CHAR(40) NOT NULL,
> ' at line 1
This works:
CREATE TABLE `calls` (
`id` bigint(20) NOT NULL auto_increment,
`sessionid` char(40) NOT NULL,
`uniqueid` char(30) NOT NULL,
`username` char(40) NOT NULL,
`nasipaddress` char(30) default NULL,
`starttime` timestamp NOT NULL default CURRENT_TIMESTAMP,
`stoptime` timestamp NOT NULL default '0000-00-00 00:00:00',
`sessiontime` int(11) default NULL,
`calledstation` char(30) default NULL,
`startdelay` int(11) default NULL,
`stopdelay` int(11) default NULL,
`terminatecause` char(20) default NULL,
`usertariff` char(20) default NULL,
`calledprovider` char(20) default NULL,
`calledcountry` char(30) default NULL,
`calledsub` char(20) default NULL,
`calledrate` float default NULL,
`sessionbill` float default NULL,
`destination` char(40) default NULL,
`id_tariffgroup` int(11) default NULL,
`id_tariffplan` int(11) default NULL,
`id_ratecard` int(11) default NULL,
`id_trunk` int(11) default NULL,
`sipiax` int(11) default '0',
`src` char(40) default NULL,
PRIMARY KEY (`id`)
)
hth,
Vahan Yerkanian
More information about the asterisk-users
mailing list