Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed Jun 1, 2023
2 parents 64f5fb7 + 2c596de commit 13db0d7
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
### Added
- added tbl_commands to myems_system_db in database
- added tbl_commands to myems_system_db database
- added tbl_combianed_equipments_commands to myems_system_db database
- added tbl_equipments_commands to myems_system_db database
- added tbl_meters_commands to myems_system_db database
- added command actions to myems-api
- added command feature to myems-admin
- added tbl_new_users to myems_user_db in database
- added tbl_new_users to myems_user_db database

### Changed
- updated tranlations of myems-admin
Expand Down
36 changes: 36 additions & 0 deletions database/install/myems_system_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_combined_equipments` (
PRIMARY KEY (`id`));
CREATE INDEX `tbl_combined_equipments_index_1` ON `myems_system_db`.`tbl_combined_equipments` (`name`);

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

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_combined_equipments_commands` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`combined_equipment_id` BIGINT NOT NULL,
`command_id` BIGINT NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_combined_equipments_comands_index_1` ON `myems_system_db`.`tbl_combined_equipments_commands` (`combined_equipment_id`);

-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_combined_equipments_equipments`
-- ---------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -298,6 +310,18 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_equipments` (
PRIMARY KEY (`id`));
CREATE INDEX `tbl_equipments_index_1` ON `myems_system_db`.`tbl_equipments` (`name`);

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

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_equipments_commands` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`equipment_id` BIGINT NOT NULL,
`command_id` BIGINT NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_equipments_comands_index_1` ON `myems_system_db`.`tbl_equipments_commands` (`equipment_id`);

-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_equipments_meters`
-- ---------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -571,6 +595,18 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_meters_points` (
PRIMARY KEY (`id`));
CREATE INDEX `tbl_meters_points_index_1` ON `myems_system_db`.`tbl_meters_points` (`meter_id`);

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

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_meters_commands` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`meter_id` BIGINT NOT NULL,
`command_id` BIGINT NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_meters_comands_index_1` ON `myems_system_db`.`tbl_meters_comands` (`meter_id`);


-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_microgrids`
Expand Down
36 changes: 36 additions & 0 deletions database/upgrade/upgrade3.4.0RC.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,42 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_commands` (
PRIMARY KEY (`id`));
CREATE INDEX `tbl_commands_index_1` ON `myems_system_db`.`tbl_commands` (`name`);

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

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_combined_equipments_commands` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`combined_equipment_id` BIGINT NOT NULL,
`command_id` BIGINT NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_combined_equipments_comands_index_1` ON `myems_system_db`.`tbl_combined_equipments_commands` (`combined_equipment_id`);

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

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_equipments_commands` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`equipment_id` BIGINT NOT NULL,
`command_id` BIGINT NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_equipments_comands_index_1` ON `myems_system_db`.`tbl_equipments_commands` (`equipment_id`);

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

CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_meters_commands` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`meter_id` BIGINT NOT NULL,
`command_id` BIGINT NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_meters_comands_index_1` ON `myems_system_db`.`tbl_meters_comands` (`meter_id`);

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

0 comments on commit 13db0d7

Please sign in to comment.