规范数据库,给各个标设置主键ID

This commit is contained in:
648540858
2022-02-22 11:44:56 +08:00
parent 0a44eb8965
commit 2157bb0270
22 changed files with 392 additions and 320 deletions

View File

@@ -1,7 +0,0 @@
ALTER TABLE stream_proxy ADD status bit(1) not null;
# 去除子查询优化查询速度
alter table device_channel
add subCount int default 0 null;
update device_channel dc set dc.subCount = (select te.count from (SELECT count(0) as count FROM device_channel WHERE parentId = dc.channelId) te)