Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed Jan 15, 2025
2 parents 3524d46 + 24e7cad commit 6d34fe7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- added `myems_historical_db`.`tbl_text_value_latest` in database
- added columns to `myems_fdd_db`.`tbl_web_messages` in database
### Changed
- changed length of decimal part of latitude and longitude to 10 in database
- updated notification in myems-web
- updated dockerfiles to reduce images size
- updated command actions in myems-api
Expand Down
30 changes: 15 additions & 15 deletions database/install/myems_system_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_charging_stations` (
`uuid` CHAR(36) NOT NULL,
`address` VARCHAR(255) NOT NULL,
`postal_code` VARCHAR(255) NOT NULL,
`latitude` DECIMAL(9, 6) NOT NULL,
`longitude` DECIMAL(9, 6) NOT NULL,
`latitude` DECIMAL(12, 10) NOT NULL,
`longitude` DECIMAL(13, 10) NOT NULL,
`rated_capacity` DECIMAL(21, 6) NOT NULL,
`rated_power` DECIMAL(21, 6) NOT NULL,
`contact_id` BIGINT NOT NULL,
Expand Down Expand Up @@ -677,8 +677,8 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_energy_storage_power_stations`
`uuid` CHAR(36) NOT NULL,
`address` VARCHAR(255) NOT NULL,
`postal_code` VARCHAR(255) NOT NULL,
`latitude` DECIMAL(9, 6) NOT NULL,
`longitude` DECIMAL(9, 6) NOT NULL,
`latitude` DECIMAL(12, 10) NOT NULL,
`longitude` DECIMAL(13, 10) NOT NULL,
`rated_capacity` DECIMAL(21, 6) NOT NULL,
`rated_power` DECIMAL(21, 6) NOT NULL,
`contact_id` BIGINT NOT NULL,
Expand Down Expand Up @@ -1044,8 +1044,8 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_microgrids` (
`uuid` CHAR(36) NOT NULL,
`address` VARCHAR(255) NOT NULL,
`postal_code` VARCHAR(255) NOT NULL,
`latitude` DECIMAL(9, 6) NOT NULL,
`longitude` DECIMAL(9, 6) NOT NULL,
`latitude` DECIMAL(12, 10) NOT NULL,
`longitude` DECIMAL(13, 10) NOT NULL,
`rated_capacity` DECIMAL(21, 6) NOT NULL,
`rated_power` DECIMAL(21, 6) NOT NULL,
`contact_id` BIGINT NOT NULL,
Expand Down Expand Up @@ -1280,8 +1280,8 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_photovoltaic_power_stations` (
`station_code` VARCHAR(255) NOT NULL,
`address` VARCHAR(255) NOT NULL,
`postal_code` VARCHAR(255) NOT NULL,
`latitude` DECIMAL(9, 6) NOT NULL,
`longitude` DECIMAL(9, 6) NOT NULL,
`latitude` DECIMAL(12, 10) NOT NULL,
`longitude` DECIMAL(13, 10) NOT NULL,
`rated_capacity` DECIMAL(21, 6) NOT NULL,
`rated_power` DECIMAL(21, 6) NOT NULL,
`contact_id` BIGINT NOT NULL,
Expand Down Expand Up @@ -1716,8 +1716,8 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_spaces` (
`is_output_counted` BOOL NOT NULL,
`contact_id` BIGINT,
`cost_center_id` BIGINT,
`latitude` DECIMAL(9, 6),
`longitude` DECIMAL(9, 6),
`latitude` DECIMAL(12, 10) NOT NULL,
`longitude` DECIMAL(13, 10) NOT NULL,
`description` VARCHAR(255),
PRIMARY KEY (`id`));
CREATE INDEX `tbl_spaces_index_1` ON `myems_system_db`.`tbl_spaces` (`name`);
Expand All @@ -1731,7 +1731,7 @@ INSERT INTO `myems_system_db`.`tbl_spaces`
`cost_center_id`, `latitude`, `longitude`, `description`)
VALUES
-- DO NOT deleted the record which ID is 1. It's the root space.
(1, 'MyEMS', '9dfb7cff-f19f-4a1e-8c79-3adf6425bfd9', NULL, 99999.999, 56, 1, true, true, 1, 39.915119, 116.403963,
(1, 'MyEMS', '9dfb7cff-f19f-4a1e-8c79-3adf6425bfd9', NULL, 99999.999, 56, 1, true, true, 1, 39.9151191111, 116.4039631111,
'MyEMS Space');

-- ---------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -2013,8 +2013,8 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_stores` (
`name` VARCHAR(255) NOT NULL,
`uuid` CHAR(36) NOT NULL,
`address` VARCHAR(255) NOT NULL,
`latitude` DECIMAL(9, 6) NOT NULL,
`longitude` DECIMAL(9, 6) NOT NULL,
`latitude` DECIMAL(12, 10) NOT NULL,
`longitude` DECIMAL(13, 10) NOT NULL,
`area` DECIMAL(21, 6) NOT NULL,
`store_type_id` BIGINT NOT NULL,
`is_input_counted` BOOL NOT NULL,
Expand Down Expand Up @@ -2468,8 +2468,8 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_wind_farms` (
`uuid` CHAR(36) NOT NULL,
`address` VARCHAR(255) NOT NULL,
`postal_code` VARCHAR(255) NOT NULL,
`latitude` DECIMAL(9, 6) NOT NULL,
`longitude` DECIMAL(9, 6) NOT NULL,
`latitude` DECIMAL(12, 10) NOT NULL,
`longitude` DECIMAL(13, 10) NOT NULL,
`rated_power` DECIMAL(21, 6) NOT NULL,
`contact_id` BIGINT NOT NULL,
`cost_center_id` BIGINT NOT NULL,
Expand Down
29 changes: 29 additions & 0 deletions database/upgrade/upgrade5.1.0RC.sql
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,35 @@ ADD `belong_to_object_type` VARCHAR(128)
COMMENT 'SYSTEM, SPACE, METER, TENANT, STORE, SHOPFLOOR, EQUIPMENT, COMBINEDEQUIPMENT, MICROGRID, ENERGYSTORAGECONTAINER, PHOTOVOLTAICPOWERSTATION'
AFTER `reply`;

ALTER TABLE `myems_system_db`.`tbl_charging_stations`
MODIFY COLUMN `latitude` DECIMAL(12, 10) NOT NULL,
MODIFY COLUMN `longitude` DECIMAL(13, 10) NOT NULL;

ALTER TABLE `myems_system_db`.`tbl_energy_storage_power_stations`
MODIFY COLUMN `latitude` DECIMAL(12, 10) NOT NULL,
MODIFY COLUMN `longitude` DECIMAL(13, 10) NOT NULL;

ALTER TABLE `myems_system_db`.`tbl_microgrids`
MODIFY COLUMN `latitude` DECIMAL(12, 10) NOT NULL,
MODIFY COLUMN `longitude` DECIMAL(13, 10) NOT NULL;

ALTER TABLE `myems_system_db`.`tbl_photovoltaic_power_stations`
MODIFY COLUMN `latitude` DECIMAL(12, 10) NOT NULL,
MODIFY COLUMN `longitude` DECIMAL(13, 10) NOT NULL;

ALTER TABLE `myems_system_db`.`tbl_spaces`
MODIFY COLUMN `latitude` DECIMAL(12, 10) NOT NULL,
MODIFY COLUMN `longitude` DECIMAL(13, 10) NOT NULL;

ALTER TABLE `myems_system_db`.`tbl_stores`
MODIFY COLUMN `latitude` DECIMAL(12, 10) NOT NULL,
MODIFY COLUMN `longitude` DECIMAL(13, 10) NOT NULL;

ALTER TABLE `myems_system_db`.`tbl_wind_farms`
MODIFY COLUMN `latitude` DECIMAL(12, 10) NOT NULL,
MODIFY COLUMN `longitude` DECIMAL(13, 10) NOT NULL;


-- UPDATE VERSION NUMBER
UPDATE `myems_system_db`.`tbl_versions` SET version='5.1.0RC', release_date='2025-01-15' WHERE id=1;

Expand Down

0 comments on commit 6d34fe7

Please sign in to comment.