MT#64939 recording: fields indicating storage

For each possible storage location, adds a bool flag to indicate whether
the media file is expected to be there.

For S3 and GCS, additionally add a field to store the URI to access the
media.

Change-Id: I7ad44275b8ffcfc0202968fcf9ad4cd883b07228
master
Richard Fuchs 2 weeks ago committed by Sipwise Jenkins Builder
parent e18c11186d
commit ce13242550

@ -0,0 +1,9 @@
use provisioning;
alter table recording_streams
drop column storage_file,
drop column storage_db,
drop column storage_s3,
drop column storage_gcs,
drop column s3_uri,
drop column gcs_uri;

@ -0,0 +1,9 @@
use provisioning;
alter table recording_streams
add column storage_file tinyint(1) not null default 1,
add column storage_db tinyint(1) not null default 0,
add column storage_s3 tinyint(1) not null default 0,
add column storage_gcs tinyint(1) not null default 0,
add column s3_uri varchar(255) not null default '',
add column gcs_uri varchar(255) not null default '';

@ -25,7 +25,7 @@ CREATE TABLE `db_schema` (
PRIMARY KEY (`id`),
UNIQUE KEY `rev_idx` (`revision`,`node`,`site_id`),
KEY `release_idx` (`release`)
) ENGINE=InnoDB AUTO_INCREMENT=927 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
) ENGINE=InnoDB AUTO_INCREMENT=928 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
@ -30979,6 +30979,7 @@ INSERT INTO `db_schema` VALUES (923,15878,'spce','1970-01-01 00:00:01','trunk',1
INSERT INTO `db_schema` VALUES (924,15879,'spce','1970-01-01 00:00:01','trunk',1);
INSERT INTO `db_schema` VALUES (925,15880,'spce','1970-01-01 00:00:01','trunk',1);
INSERT INTO `db_schema` VALUES (926,15881,'spce','1970-01-01 00:00:01','trunk',1);
INSERT INTO `db_schema` VALUES (927,15884,'spce','1970-01-01 00:00:01','trunk',1);
COMMIT;
SET AUTOCOMMIT=@OLD_AUTOCOMMIT;
SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0;

@ -1320,6 +1320,18 @@
"TABLE_NAME" : "recording_streams",
"key_col" : "recording_streams/full_filename"
},
"recording_streams/gcs_uri" : {
"CHARACTER_SET_NAME" : "utf8mb3",
"COLLATION_NAME" : "utf8mb3_general_ci",
"COLUMN_DEFAULT" : "''",
"COLUMN_NAME" : "gcs_uri",
"COLUMN_TYPE" : "varchar(255)",
"EXTRA" : "",
"IS_NULLABLE" : "NO",
"ORDINAL_POSITION" : 24,
"TABLE_NAME" : "recording_streams",
"key_col" : "recording_streams/gcs_uri"
},
"recording_streams/id" : {
"CHARACTER_SET_NAME" : null,
"COLLATION_NAME" : null,
@ -1356,6 +1368,18 @@
"TABLE_NAME" : "recording_streams",
"key_col" : "recording_streams/output_type"
},
"recording_streams/s3_uri" : {
"CHARACTER_SET_NAME" : "utf8mb3",
"COLLATION_NAME" : "utf8mb3_general_ci",
"COLUMN_DEFAULT" : "''",
"COLUMN_NAME" : "s3_uri",
"COLUMN_TYPE" : "varchar(255)",
"EXTRA" : "",
"IS_NULLABLE" : "NO",
"ORDINAL_POSITION" : 23,
"TABLE_NAME" : "recording_streams",
"key_col" : "recording_streams/s3_uri"
},
"recording_streams/sample_rate" : {
"CHARACTER_SET_NAME" : null,
"COLLATION_NAME" : null,
@ -1404,6 +1428,54 @@
"TABLE_NAME" : "recording_streams",
"key_col" : "recording_streams/start_timestamp"
},
"recording_streams/storage_db" : {
"CHARACTER_SET_NAME" : null,
"COLLATION_NAME" : null,
"COLUMN_DEFAULT" : "0",
"COLUMN_NAME" : "storage_db",
"COLUMN_TYPE" : "tinyint(1)",
"EXTRA" : "",
"IS_NULLABLE" : "NO",
"ORDINAL_POSITION" : 20,
"TABLE_NAME" : "recording_streams",
"key_col" : "recording_streams/storage_db"
},
"recording_streams/storage_file" : {
"CHARACTER_SET_NAME" : null,
"COLLATION_NAME" : null,
"COLUMN_DEFAULT" : "1",
"COLUMN_NAME" : "storage_file",
"COLUMN_TYPE" : "tinyint(1)",
"EXTRA" : "",
"IS_NULLABLE" : "NO",
"ORDINAL_POSITION" : 19,
"TABLE_NAME" : "recording_streams",
"key_col" : "recording_streams/storage_file"
},
"recording_streams/storage_gcs" : {
"CHARACTER_SET_NAME" : null,
"COLLATION_NAME" : null,
"COLUMN_DEFAULT" : "0",
"COLUMN_NAME" : "storage_gcs",
"COLUMN_TYPE" : "tinyint(1)",
"EXTRA" : "",
"IS_NULLABLE" : "NO",
"ORDINAL_POSITION" : 22,
"TABLE_NAME" : "recording_streams",
"key_col" : "recording_streams/storage_gcs"
},
"recording_streams/storage_s3" : {
"CHARACTER_SET_NAME" : null,
"COLLATION_NAME" : null,
"COLUMN_DEFAULT" : "0",
"COLUMN_NAME" : "storage_s3",
"COLUMN_TYPE" : "tinyint(1)",
"EXTRA" : "",
"IS_NULLABLE" : "NO",
"ORDINAL_POSITION" : 21,
"TABLE_NAME" : "recording_streams",
"key_col" : "recording_streams/storage_s3"
},
"recording_streams/stream" : {
"CHARACTER_SET_NAME" : null,
"COLLATION_NAME" : null,

@ -286,6 +286,12 @@ CREATE TABLE `recording_streams` (
`stream` longblob NOT NULL DEFAULT '',
`transcript_status` enum('none','pending','done') NOT NULL DEFAULT 'none',
`transcript` text NOT NULL DEFAULT '',
`storage_file` tinyint(1) NOT NULL DEFAULT 1,
`storage_db` tinyint(1) NOT NULL DEFAULT 0,
`storage_s3` tinyint(1) NOT NULL DEFAULT 0,
`storage_gcs` tinyint(1) NOT NULL DEFAULT 0,
`s3_uri` varchar(255) NOT NULL DEFAULT '',
`gcs_uri` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `call` (`call`),
KEY `transcript_status_call_idx` (`transcript_status`,`call`),

Loading…
Cancel
Save