feat(pbx): refs #7198 country prefix, schedule #2284
|
@ -1973,6 +1973,15 @@ INSERT INTO `vn`.`ticketService`(`id`, `description`, `quantity`, `price`, `taxC
|
|||
(4, 'Documentos', 1, 2.00, 1, 9, 1),
|
||||
(5, 'Documentos', 1, 2.00, 1, 8, 1);
|
||||
|
||||
INSERT INTO `pbx`.`config` (id,defaultPrefix)
|
||||
VALUES (1,'0034');
|
||||
|
||||
INSERT INTO `pbx`.`prefix` (country, prefix)
|
||||
VALUES
|
||||
('es', '0034'),
|
||||
('fr', '0033'),
|
||||
('pt', '00351');
|
||||
|
||||
INSERT INTO `pbx`.`sip`(`user_id`, `extension`)
|
||||
VALUES
|
||||
(1, 1010),
|
||||
|
@ -3745,4 +3754,4 @@ INSERT INTO vn.ticketLog (originFk,userFk,`action`,creationDate,changedModel,new
|
|||
|
||||
INSERT INTO `vn`.`supplierDms`(`supplierFk`, `dmsFk`, `editorFk`)
|
||||
VALUES
|
||||
(1, 10, 9);
|
||||
(1, 10, 9);
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
CREATE TABLE IF NOT EXISTS pbx.prefix (
|
||||
country CHAR(2) NOT NULL COMMENT 'Country code',
|
||||
prefix varchar(100) NOT NULL COMMENT 'Country prefix',
|
||||
CONSTRAINT prefix_pk PRIMARY KEY (country)
|
||||
)
|
||||
ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb3
|
||||
COLLATE=utf8mb3_unicode_ci;
|
||||
|
||||
ALTER TABLE pbx.config
|
||||
CHANGE countryPrefix defaultPrefix varchar(20)
|
||||
CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL NULL;
|
||||
|
||||
ALTER TABLE pbx.config DROP COLUMN IF EXISTS sundayFestive;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS pbx.holiday (
|
||||
id INT UNSIGNED auto_increment NOT NULL,
|
||||
country CHAR(2) NOT NULL,
|
||||
`day` DATE NOT NULL,
|
||||
CONSTRAINT holiday_pk PRIMARY KEY (id)
|
||||
)
|
||||
ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb3
|
||||
COLLATE=utf8mb3_unicode_ci;
|
||||
CREATE UNIQUE INDEX holiday_country_IDX USING BTREE ON pbx.holiday (country,`day`);
|
||||
|
||||
ALTER TABLE pbx.schedule
|
||||
CHANGE timeStart startTime time NOT NULL,
|
||||
CHANGE timeEnd endTime time NOT NULL,
|
||||
DROP FOREIGN KEY schedule_ibfk_1,
|
||||
DROP COLUMN queue,
|
||||
ADD country CHAR(2) NOT NULL,
|
||||
CHANGE weekDay weekDays set('mon','tue','wed','thu','fri','sat','sun') NOT NULL
|
||||
COMMENT '0 = Monday, 6 = Sunday';
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
INSERT INTO pbx.prefix (country,prefix)
|
||||
VALUES ('es','0034');
|
||||
INSERT INTO pbx.prefix (country,prefix)
|
||||
VALUES ('fr','0033');
|
||||
INSERT INTO pbx.prefix (country,prefix)
|
||||
VALUES ('pt','00351');
|
||||
|
||||
INSERT INTO pbx.schedule (weekDays,startTime,endTime,country)
|
||||
VALUES ('mon,tue,wed,thu,fri,sat,sun','00:00','24:00','es');
|
||||
INSERT INTO pbx.schedule (weekDays,startTime,endTime,country)
|
||||
VALUES ('mon,tue,wed,thu,fri,sat,sun','00:00','24:00','fr');
|
||||
INSERT INTO pbx.schedule (weekDays,startTime,endTime,country)
|
||||
VALUES ('mon,tue,wed,thu,fri,sat,sun','00:00','24:00','pt');
|
Loading…
Reference in New Issue