Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed May 26, 2023
2 parents c225b49 + 35dd3aa commit b2b6e55
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
### Added

- added tbl_commands to system database
-
### Changed
- updated tranlations of myems-admin

Expand Down
18 changes: 18 additions & 0 deletions database/install/myems_system_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,24 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_combined_equipments_virtual_me
PRIMARY KEY (`id`));
CREATE INDEX `tbl_combined_equipments_virtual_meters_index_1` ON `myems_system_db`.`tbl_combined_equipments_virtual_meters` (`combined_equipment_id`);


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

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_commands` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`uuid` CHAR(36) NOT NULL,
`topic` VARCHAR(255) NOT NULL,
`payload` LONGTEXT NOT NULL COMMENT 'MUST be in JSON format',
`set_value` DECIMAL(18, 3) NULL COMMENT 'If not null, the $s1 in payload will be replaced with this value',
`description` VARCHAR(255) ,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_commands_index_1` ON `myems_system_db`.`tbl_commands` (`name`);


-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_contacts`
-- ---------------------------------------------------------------------------------------------------------------------
Expand Down
16 changes: 16 additions & 0 deletions database/upgrade/upgrade3.4.0RC.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@

START TRANSACTION;

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

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_commands` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`uuid` CHAR(36) NOT NULL,
`topic` VARCHAR(255) NOT NULL,
`payload` LONGTEXT NOT NULL COMMENT 'MUST be in JSON format',
`set_value` DECIMAL(18, 3) NULL COMMENT 'If not null, the $s1 in payload will be replaced with this value',
`description` VARCHAR(255) ,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_commands_index_1` ON `myems_system_db`.`tbl_commands` (`name`);

-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_microgrids`
-- ---------------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit b2b6e55

Please sign in to comment.