From df75b647da03eba6920020bac0cc950032a1e930 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Mon, 17 Oct 2016 14:08:19 -0500 Subject: Update for 13.12.0-rc1 --- .../realtime/postgresql/postgresql_voicemail.sql | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 contrib/realtime/postgresql/postgresql_voicemail.sql (limited to 'contrib/realtime/postgresql/postgresql_voicemail.sql') diff --git a/contrib/realtime/postgresql/postgresql_voicemail.sql b/contrib/realtime/postgresql/postgresql_voicemail.sql new file mode 100644 index 000000000..f9257849c --- /dev/null +++ b/contrib/realtime/postgresql/postgresql_voicemail.sql @@ -0,0 +1,38 @@ +BEGIN; + +CREATE TABLE alembic_version ( + version_num VARCHAR(32) NOT NULL +); + +-- Running upgrade -> a2e9769475e + +CREATE TABLE voicemail_messages ( + dir VARCHAR(255) NOT NULL, + msgnum INTEGER NOT NULL, + context VARCHAR(80), + macrocontext VARCHAR(80), + callerid VARCHAR(80), + origtime INTEGER, + duration INTEGER, + recording BYTEA, + flag VARCHAR(30), + category VARCHAR(30), + mailboxuser VARCHAR(30), + mailboxcontext VARCHAR(30), + msg_id VARCHAR(40) +); + +ALTER TABLE voicemail_messages ADD CONSTRAINT voicemail_messages_dir_msgnum PRIMARY KEY (dir, msgnum); + +CREATE INDEX voicemail_messages_dir ON voicemail_messages (dir); + +INSERT INTO alembic_version (version_num) VALUES ('a2e9769475e'); + +-- Running upgrade a2e9769475e -> 39428242f7f5 + +ALTER TABLE voicemail_messages ALTER COLUMN recording TYPE BYTEA; + +UPDATE alembic_version SET version_num='39428242f7f5' WHERE alembic_version.version_num = 'a2e9769475e'; + +COMMIT; + -- cgit v1.2.3