Skip to content
This repository
Newer
Older
100644 38 lines (26 sloc) 1.274 kb
528530f3 »
2010-09-03 update TODO + add instructions how to import old mysql DB
1
2
3 IMPORT MYSQL CDR DATABASE
4 ---------------------------
5
6 If you are willing to edit the CDR from the admin panel, you will need to alter the original cdr table used by asterisk and add a Primary Key.
7 The Following SQL instructions might help.
8
9
10 CREATE TABLE cdr_new (
dc69a12c »
2010-10-21 fix DB schema + bug on show grid if no data
11 id integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
528530f3 »
2010-09-03 update TODO + add instructions how to import old mysql DB
12 src varchar(80) NOT NULL,
13 dst varchar(80) NOT NULL,
14 calldate datetime NOT NULL,
15 clid varchar(80) NOT NULL,
16 dcontext varchar(80) NOT NULL,
17 channel varchar(80) NOT NULL,
18 dstchannel varchar(80) NOT NULL,
19 lastapp varchar(80) NOT NULL,
20 lastdata varchar(80) NOT NULL,
21 duration integer unsigned NOT NULL,
22 billsec integer unsigned NOT NULL,
23 disposition integer unsigned NOT NULL,
24 amaflags integer unsigned NOT NULL,
25 accountcode integer unsigned NOT NULL,
26 uniqueid varchar(32) NOT NULL,
27 userfield varchar(80) NOT NULL
28 );
29
30
31 INSERT INTO cdr_new (src,dst,calldate,clid,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) SELECT src,dst,calldate,clid,dcontext,channel,dstchannel,lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield FROM cdr;
32
33 RENAME TABLE cdr TO cdr_backup;
34
35 RENAME TABLE cdr_new TO cdr;
36
37
Something went wrong with that request. Please try again.