mirror of https://github.com/sipwise/db-schema.git
Change-Id: I029da77de6d91e5f8938dabdbbf419d8968b669bchanges/83/11383/6
parent
e0efa1ebd5
commit
7d2981c2fe
@ -0,0 +1,10 @@
|
||||
use provisioning;
|
||||
set autocommit=0;
|
||||
|
||||
DROP TABLE `recording_calls`;
|
||||
DROP TABLE `recording_streams`;
|
||||
|
||||
revoke all on provisioning.recording_calls from 'rtpengine'@'localhost';
|
||||
revoke all on provisioning.recording_streams from 'rtpengine'@'localhost';
|
||||
|
||||
commit;
|
@ -0,0 +1,34 @@
|
||||
use provisioning;
|
||||
set autocommit=0;
|
||||
|
||||
CREATE TABLE `recording_calls` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`call_id` varchar(250) NOT NULL,
|
||||
`start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`end_time` datetime,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `call_id` (`call_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `recording_streams` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`call` int(10) unsigned NOT NULL,
|
||||
`local_filename` varchar(250) NOT NULL,
|
||||
`full_filename` varchar(250) NOT NULL,
|
||||
`file_format` varchar(10) NOT NULL,
|
||||
`output_type` enum('mixed','single') NOT NULL,
|
||||
`stream_id` int(10) unsigned NOT NULL,
|
||||
`start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`end_time` datetime,
|
||||
`sample_rate` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
`channels` int(10) unsigned NOT NULL DEFAULT 0,
|
||||
`ssrc` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `call` (`call`),
|
||||
CONSTRAINT `fk_call_id` FOREIGN KEY (`call`) REFERENCES `recording_calls` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
grant all on provisioning.recording_calls to 'rtpengine'@'localhost';
|
||||
grant all on provisioning.recording_streams to 'rtpengine'@'localhost';
|
||||
|
||||
commit;
|
Loading…
Reference in new issue