You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
db-schema/db_scripts/diff/15005.up

28 lines
924 B

USE billing;
SET AUTOCOMMIT=0;
ALTER TABLE products CHANGE COLUMN class class ENUM('sippeering', 'pstnpeering', 'reseller', 'sipaccount', 'pbxaccount') NOT NULL;
INSERT INTO products VALUES
(NULL, NULL, 'sipaccount', 'SIP_ACCOUNT', 'Basic SIP Account', 1, NULL, NULL, NULL);
SELECT LAST_INSERT_ID() INTO @sip_id;
UPDATE billing_mappings SET product_id = @sip_id WHERE product_id IS NULL;
INSERT INTO products VALUES
(NULL, NULL, 'pbxaccount', 'PBX_ACCOUNT', 'Cloud PBX Account', 1, NULL, NULL, NULL);
USE provisioning;
CREATE TABLE `voip_pbx_groups` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`contract_id` int(11) unsigned NOT NULL,
`number_id` int(11) unsigned DEFAULT NULL,
`hunt_policy` enum('serial','parallel') NOT NULL DEFAULT 'serial',
`hunt_policy_timeout` int(4) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `contract_idx` (`contract_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;