updated tbl_expressions in database

pull/42/MERGE
13621160019@163.com 2021-05-24 18:27:47 +08:00
parent 99245d88c5
commit dca4a6da26
2 changed files with 5 additions and 2 deletions

View File

@ -704,7 +704,7 @@ CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_expressions` (
`id` BIGINT NOT NULL AUTO_INCREMENT, `id` BIGINT NOT NULL AUTO_INCREMENT,
`uuid` CHAR(36) NOT NULL, `uuid` CHAR(36) NOT NULL,
`virtual_meter_id` BIGINT NOT NULL, `virtual_meter_id` BIGINT NOT NULL,
`equation` VARCHAR(1024) NOT NULL, `equation` LONGTEXT NOT NULL,
PRIMARY KEY (`id`)); PRIMARY KEY (`id`));
CREATE INDEX `tbl_expressions_index_1` ON `myems_system_db`.`tbl_expressions` (`virtual_meter_id`); CREATE INDEX `tbl_expressions_index_1` ON `myems_system_db`.`tbl_expressions` (`virtual_meter_id`);
@ -717,7 +717,7 @@ CREATE INDEX `tbl_expressions_index_1` ON `myems_system_db`.`tbl_expressions`
-- INSERT INTO `myems_system_db`.`tbl_expressions` -- INSERT INTO `myems_system_db`.`tbl_expressions`
-- (`id`, `uuid`, `virtual_meter_id`, `equation`) -- (`id`, `uuid`, `virtual_meter_id`, `equation`)
-- VALUES -- VALUES
-- (1, '3fff2cfb-f755-44c8-a919-6135205a8573', 1, 'x+y-z'); -- (1, '3fff2cfb-f755-44c8-a919-6135205a8573', 1, 'x1+x2-x3');
-- COMMIT; -- COMMIT;
-- --------------------------------------------------------------------------------------------------------------------- -- ---------------------------------------------------------------------------------------------------------------------

View File

@ -2,6 +2,9 @@
ALTER TABLE myems_system_db.tbl_points MODIFY COLUMN low_limit decimal(18,3) NOT NULL; ALTER TABLE myems_system_db.tbl_points MODIFY COLUMN low_limit decimal(18,3) NOT NULL;
ALTER TABLE myems_system_db.tbl_points ADD is_virtual BOOL DEFAULT FALSE NOT NULL AFTER is_trend; ALTER TABLE myems_system_db.tbl_points ADD is_virtual BOOL DEFAULT FALSE NOT NULL AFTER is_trend;
-- UPDATE EXPRESSION TABLE
ALTER TABLE myems_system_db.tbl_expressions MODIFY COLUMN equation LONGTEXT NOT NULL;
-- UPDATE VERSION NUMBER -- UPDATE VERSION NUMBER
UPDATE myems_system_db.tbl_versions SET version='1.1.3', release_date='2021-05-05' WHERE id=1; UPDATE myems_system_db.tbl_versions SET version='1.1.3', release_date='2021-05-05' WHERE id=1;