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

added myems energy plan database

上级 29a12673
......@@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- added start datetime, end datetime and update datetime to fdd webmessage
- added is_cost_data_displayed to microgrid and energy storage power station
- added energy storage power station relation to space in myems-api
- added myems energy plan database
-
### Changed
- changed map marker in myems-web
### Fixed
......
-- MyEMS Energy Plan Database
-- ---------------------------------------------------------------------------------------------------------------------
-- Schema myems_energy_plan_db
-- ---------------------------------------------------------------------------------------------------------------------
DROP DATABASE IF EXISTS `myems_energy_plan_db` ;
CREATE DATABASE IF NOT EXISTS `myems_energy_plan_db` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' ;
USE `myems_energy_plan_db` ;
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_combined_equipment_input_category_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_combined_equipment_input_category_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_combined_equipment_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`combined_equipment_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_combined_equipment_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_combined_equipment_input_category_hourly`
(`combined_equipment_id`, `energy_category_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_combined_equipment_input_item_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_combined_equipment_input_item_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_combined_equipment_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`combined_equipment_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_combined_equipment_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_combined_equipment_input_item_hourly`
(`combined_equipment_id`, `energy_item_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_combined_equipment_output_category_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_combined_equipment_output_category_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_combined_equipment_output_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`combined_equipment_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_combined_equipment_output_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_combined_equipment_output_category_hourly`
(`combined_equipment_id`, `energy_category_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_equipment_input_category_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_equipment_input_category_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_equipment_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`equipment_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_equipment_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_equipment_input_category_hourly`
(`equipment_id`, `energy_category_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_equipment_input_item_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_equipment_input_item_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_equipment_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`equipment_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_equipment_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_equipment_input_item_hourly`
(`equipment_id`, `energy_item_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_equipment_output_category_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_equipment_output_category_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_equipment_output_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`equipment_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_equipment_output_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_equipment_output_category_hourly`
(`equipment_id`, `energy_category_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_meter_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_meter_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_meter_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`meter_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_meter_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_meter_hourly`
(`meter_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_offline_meter_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_offline_meter_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_offline_meter_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`offline_meter_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_offline_meter_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_offline_meter_hourly` (`offline_meter_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_shopfloor_input_category_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_shopfloor_input_category_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_shopfloor_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`shopfloor_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_shopfloor_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_shopfloor_input_category_hourly`
(`shopfloor_id`, `energy_category_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_shopfloor_input_item_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_shopfloor_input_item_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_shopfloor_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`shopfloor_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_shopfloor_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_shopfloor_input_item_hourly`
(`shopfloor_id`, `energy_item_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_space_input_category_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_space_input_category_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_space_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`space_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_space_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_space_input_category_hourly`
(`space_id`, `energy_category_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_space_input_item_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_space_input_item_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_space_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`space_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_space_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_space_input_item_hourly`
(`space_id`, `energy_item_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_space_output_category_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_space_output_category_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_space_output_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`space_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_space_output_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_space_output_category_hourly`
(`space_id`, `energy_category_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_store_input_category_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_store_input_category_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_store_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`store_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_store_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_store_input_category_hourly`
(`store_id`, `energy_category_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_store_input_item_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_store_input_item_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_store_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`store_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_store_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_store_input_item_hourly`
(`store_id`, `energy_item_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_tenant_input_category_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_tenant_input_category_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_tenant_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`tenant_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_tenant_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_tenant_input_category_hourly`
(`tenant_id`, `energy_category_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_tenant_input_item_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_tenant_input_item_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_tenant_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`tenant_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_tenant_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_tenant_input_item_hourly`
(`tenant_id`, `energy_item_id`, `start_datetime_utc`);
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_energy_plan_db`.`tbl_virtual_meter_hourly`
-- ---------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `myems_energy_plan_db`.`tbl_virtual_meter_hourly` ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_virtual_meter_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`virtual_meter_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_virtual_meter_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_virtual_meter_hourly` (`virtual_meter_id`, `start_datetime_utc`);
......@@ -24,6 +24,201 @@ ALTER TABLE `myems_fdd_db`.`tbl_web_messages` ADD `start_datetime_utc` DATETIME
ALTER TABLE `myems_system_db`.`tbl_energy_storage_power_stations` ADD `is_cost_data_displayed` BOOL NOT NULL AFTER `svg`;
ALTER TABLE `myems_system_db`.`tbl_microgrids` ADD `is_cost_data_displayed` BOOL NOT NULL AFTER `svg`;
-- Create Energy Plan Database
CREATE DATABASE IF NOT EXISTS `myems_energy_plan_db` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_unicode_ci' ;
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_combined_equipment_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`combined_equipment_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_combined_equipment_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_combined_equipment_input_category_hourly`
(`combined_equipment_id`, `energy_category_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_combined_equipment_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`combined_equipment_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_combined_equipment_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_combined_equipment_input_item_hourly`
(`combined_equipment_id`, `energy_item_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_combined_equipment_output_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`combined_equipment_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_combined_equipment_output_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_combined_equipment_output_category_hourly`
(`combined_equipment_id`, `energy_category_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_equipment_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`equipment_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_equipment_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_equipment_input_category_hourly`
(`equipment_id`, `energy_category_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_equipment_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`equipment_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_equipment_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_equipment_input_item_hourly`
(`equipment_id`, `energy_item_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_equipment_output_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`equipment_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_equipment_output_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_equipment_output_category_hourly`
(`equipment_id`, `energy_category_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_meter_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`meter_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_meter_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_meter_hourly`
(`meter_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_offline_meter_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`offline_meter_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_offline_meter_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_offline_meter_hourly` (`offline_meter_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_shopfloor_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`shopfloor_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_shopfloor_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_shopfloor_input_category_hourly`
(`shopfloor_id`, `energy_category_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_shopfloor_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`shopfloor_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_shopfloor_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_shopfloor_input_item_hourly`
(`shopfloor_id`, `energy_item_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_space_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`space_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_space_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_space_input_category_hourly`
(`space_id`, `energy_category_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_space_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`space_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_space_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_space_input_item_hourly`
(`space_id`, `energy_item_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_space_output_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`space_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_space_output_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_space_output_category_hourly`
(`space_id`, `energy_category_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_store_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`store_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_store_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_store_input_category_hourly`
(`store_id`, `energy_category_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_store_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`store_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_store_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_store_input_item_hourly`
(`store_id`, `energy_item_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_tenant_input_category_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`tenant_id` BIGINT NOT NULL,
`energy_category_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_tenant_input_category_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_tenant_input_category_hourly`
(`tenant_id`, `energy_category_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_tenant_input_item_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`tenant_id` BIGINT NOT NULL,
`energy_item_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_tenant_input_item_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_tenant_input_item_hourly`
(`tenant_id`, `energy_item_id`, `start_datetime_utc`);
CREATE TABLE IF NOT EXISTS `myems_energy_plan_db`.`tbl_virtual_meter_hourly` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`virtual_meter_id` BIGINT NOT NULL,
`start_datetime_utc` DATETIME NOT NULL,
`actual_value` DECIMAL(18, 3) NOT NULL,
PRIMARY KEY (`id`));
CREATE INDEX `tbl_virtual_meter_hourly_index_1`
ON `myems_energy_plan_db`.`tbl_virtual_meter_hourly` (`virtual_meter_id`, `start_datetime_utc`);
-- UPDATE VERSION NUMBER
UPDATE `myems_system_db`.`tbl_versions` SET version='4.4.0RC', release_date='2024-04-10' WHERE id=1;
......
......@@ -5,7 +5,6 @@
<div class="profile-element" uib-dropdown>
<img alt="image" class="logopng" src="img/myemslogo.png"/>
<!-- <img alt="image" class="logopng" src="img/albertemslogo.png"/> -->
</div>
<div class="logo-element">
{{'MY_EMS_NAME' | translate }}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册