提交 2c596dee 编写于 作者: nengyuangzhang's avatar nengyuangzhang

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
上级 8f3104b2
......@@ -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
......
......@@ -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`
-- ---------------------------------------------------------------------------------------------------------------------
......@@ -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`
-- ---------------------------------------------------------------------------------------------------------------------
......@@ -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`
......
......@@ -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`
-- ---------------------------------------------------------------------------------------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册