Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed Jul 1, 2024
2 parents 75415f9 + facc407 commit a02c56d
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- added phase_of_lifecycle to microgird
- added work order (preview) to myems-web
- added new protocol mqtt-xintianli
- added protocols table to database
### Changed
- replaced svg with svg_id in microgrid
- replaced svg with svg_id in energy storage power station
Expand Down
50 changes: 50 additions & 0 deletions database/install/myems_system_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,56 @@ CREATE INDEX `tbl_points_index_1` ON `myems_system_db`.`tbl_points` (`name`);
CREATE INDEX `tbl_points_index_2` ON `myems_system_db`.`tbl_points` (`data_source_id`);
CREATE INDEX `tbl_points_index_3` ON `myems_system_db`.`tbl_points` (`id`, `object_type`);

-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_protocols`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_system_db`.`tbl_protocols` ;

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_protocols` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`code` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_protocols_index_1` ON `myems_system_db`.`tbl_protocols` (`name`);

INSERT INTO myems_system_db.tbl_protocols (id,name,code)
VALUES
(1,'bacnet-ip', 'bacnet-ip'),
(2,'cassandra', 'cassandra'),
(3,'clickhouse', 'clickhouse'),
(4,'coap', 'coap'),
(5,'controllogix', 'controllogix'),
(6,'dlt645', 'dlt645'),
(7,'dtu-rtu', 'dtu-rtu'),
(8,'dtu-tcp', 'dtu-tcp'),
(9,'dtu-mqtt', 'dtu-mqtt'),
(10,'elexon-bmrs', 'elexon-bmrs'),
(11,'iec104', 'iec104'),
(12,'influxdb', 'influxdb'),
(13,'lora', 'lora'),
(14,'modbus-rtu', 'modbus-rtu'),
(15,'modbus-tcp', 'modbus-tcp'),
(16,'mongodb', 'mongodb'),
(17,'mqtt-acrel', 'mqtt-acrel'),
(18,'mqtt-adw300', 'mqtt-adw300'),
(19,'mqtt-huiju', 'mqtt-huiju'),
(20,'mqtt-md4220', 'mqtt-md4220'),
(21,'mqtt-seg', 'mqtt-seg'),
(22,'mqtt-weilan', 'mqtt-weilan'),
(23,'mqtt-xintianli', 'mqtt-xintianli'),
(24,'mqtt-zhongxian', 'mqtt-zhongxian'),
(25,'mqtt', 'mqtt'),
(26,'mysql', 'mysql'),
(27,'opc-ua', 'opc-ua'),
(28,'oracle', 'oracle'),
(29,'postgresql', 'postgresql'),
(30,'profibus', 'profibus'),
(31,'profinet', 'profinet'),
(32,'s7', 's7'),
(33,'simulation', 'simulation'),
(34,'sqlserver', 'sqlserver'),
(35,'tdengine', 'tdengine'),
(36,'weather', 'weather');
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_sensors`
-- ---------------------------------------------------------------------------------------------------------------------
Expand Down
47 changes: 47 additions & 0 deletions database/upgrade/upgrade4.7.0RC.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,53 @@ VALUES
(40002,'Work Order Repair','/workorder/repair',40000,1),
(40003,'Work Order Inspection','/workorder/inspection',40000,1);


CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_protocols` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`code` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_protocols_index_1` ON `myems_system_db`.`tbl_protocols` (`name`);

INSERT INTO myems_system_db.tbl_protocols (id,name,code)
VALUES
(1,'bacnet-ip', 'bacnet-ip'),
(2,'cassandra', 'cassandra'),
(3,'clickhouse', 'clickhouse'),
(4,'coap', 'coap'),
(5,'controllogix', 'controllogix'),
(6,'dlt645', 'dlt645'),
(7,'dtu-rtu', 'dtu-rtu'),
(8,'dtu-tcp', 'dtu-tcp'),
(9,'dtu-mqtt', 'dtu-mqtt'),
(10,'elexon-bmrs', 'elexon-bmrs'),
(11,'iec104', 'iec104'),
(12,'influxdb', 'influxdb'),
(13,'lora', 'lora'),
(14,'modbus-rtu', 'modbus-rtu'),
(15,'modbus-tcp', 'modbus-tcp'),
(16,'mongodb', 'mongodb'),
(17,'mqtt-acrel', 'mqtt-acrel'),
(18,'mqtt-adw300', 'mqtt-adw300'),
(19,'mqtt-huiju', 'mqtt-huiju'),
(20,'mqtt-md4220', 'mqtt-md4220'),
(21,'mqtt-seg', 'mqtt-seg'),
(22,'mqtt-weilan', 'mqtt-weilan'),
(23,'mqtt-xintianli', 'mqtt-xintianli'),
(24,'mqtt-zhongxian', 'mqtt-zhongxian'),
(25,'mqtt', 'mqtt'),
(26,'mysql', 'mysql'),
(27,'opc-ua', 'opc-ua'),
(28,'oracle', 'oracle'),
(29,'postgresql', 'postgresql'),
(30,'profibus', 'profibus'),
(31,'profinet', 'profinet'),
(32,'s7', 's7'),
(33,'simulation', 'simulation'),
(34,'sqlserver', 'sqlserver'),
(35,'tdengine', 'tdengine'),
(36,'weather', 'weather');

-- UPDATE VERSION NUMBER
UPDATE `myems_system_db`.`tbl_versions` SET version='4.7.0RC', release_date='2024-07-07' WHERE id=1;

Expand Down

0 comments on commit a02c56d

Please sign in to comment.