|
@@ -361,7 +361,6 @@
|
|
|
</update>
|
|
|
<update id="timedAlterTable">
|
|
|
alter table alarmhistory_${stationname}_${yearmonth}
|
|
|
- owner to gdprod
|
|
|
</update>
|
|
|
<update id="timedCreatAlerttimeIndex">
|
|
|
create index IX_AH_${stationname}_${yearmonth}_alerttime on alarmhistory_${stationname}_${yearmonth} ("alerttime")
|
|
@@ -370,7 +369,8 @@
|
|
|
create index IX_AH_${stationname}_${yearmonth}_snapid on alarmhistory_${stationname}_${yearmonth} ("snapid")
|
|
|
</update>
|
|
|
<select id="isHasTable" resultType="java.lang.Integer">
|
|
|
- select count(*) from information_schema.TABLES where table_name =upper('alarmhistory_{stationname}_${yearmonth}')
|
|
|
+ select count(*) from information_schema.tables where table_schema='public' and table_type='BASE TABLE' and
|
|
|
+ table_name=LOWER('alarmhistory_${stationname}_${yearmonth}');
|
|
|
</select>
|
|
|
|
|
|
<select id="getlatestAlarmHistory" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.model.AlarmHistoryInfo">
|