From 41f847e412459a8fdbb964121351674554e8cfd1 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 21 Mar 2017 10:09:56 -0400 Subject: [PATCH] TT#13005 add table to store call recording metadata Change-Id: I5dcbe08ac529106a4868b8f48ada168128ca5265 --- db_scripts/diff/15328.down | 8 ++++++++ db_scripts/diff/15328.up | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 db_scripts/diff/15328.down create mode 100644 db_scripts/diff/15328.up diff --git a/db_scripts/diff/15328.down b/db_scripts/diff/15328.down new file mode 100644 index 00000000..5340cbc1 --- /dev/null +++ b/db_scripts/diff/15328.down @@ -0,0 +1,8 @@ +use provisioning; +set autocommit=0; + +DROP TABLE `recording_metakeys`; + +revoke all on provisioning.recording_metakeys from 'rtpengine'@'localhost'; + +commit; diff --git a/db_scripts/diff/15328.up b/db_scripts/diff/15328.up new file mode 100644 index 00000000..da7ae6fb --- /dev/null +++ b/db_scripts/diff/15328.up @@ -0,0 +1,17 @@ +use provisioning; +set autocommit=0; + +CREATE TABLE `recording_metakeys` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `call` int(10) unsigned NOT NULL, + `key` char(255) NOT NULL, + `value` char(255) NOT NULL, + PRIMARY KEY (`id`), + KEY `prim_lookup` (`value`,`key`), + KEY `fk_call_idx` (`call`), + CONSTRAINT `fk_call_idx` FOREIGN KEY (`call`) REFERENCES `recording_calls` (`id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB; + +grant all on provisioning.recording_metakeys to 'rtpengine'@'localhost'; + +commit;