Reformat queries to be multiline
[freeradius.git] / src / billing / clarent_db_schema-postgres.sql
1 /*
2  * --- Peter Nixon [ codemonkey@peternixon.net ]
3  *
4  */
5
6 CREATE TABLE billing_record (
7   Id BIGSERIAL PRIMARY KEY,
8   local_SetupTime timestamp,
9   start_time NUMERIC(11),
10   duration INTEGER,
11   service_code CHAR(1),
12   phone_number VARCHAR(24),
13   ip_addr_ingress INET,
14   ip_addr_egress INET,
15   bill_type CHAR(1),
16   disconnect_reason CHAR(2),
17   extended_reason_code CHAR(2),
18   dialed_number VARCHAR(30),
19   codec VARCHAR(20),
20   h323ConfID VARCHAR(64)
21 );
22 create UNIQUE index combo on billing_record (start_time, ip_addr_ingress, h323ConfID);