Commit f510b142a786cd755344924f003913efb05db4c2

Authored by Dmytro Shvaika
Committed by Andrew Shvayka
1 parent f647c69f

fix cleanup_timeseries_by_ttl procedure

... ... @@ -59,8 +59,8 @@ $$
59 59 DECLARE
60 60 tenant_cursor CURSOR FOR select tenant.id as tenant_id
61 61 from tenant;
62   - tenant_id_record varchar;
63   - customer_id_record varchar;
  62 + tenant_id_record uuid;
  63 + customer_id_record uuid;
64 64 tenant_ttl bigint;
65 65 customer_ttl bigint;
66 66 deleted_for_entities bigint;
... ...
... ... @@ -197,6 +197,8 @@ public class PsqlTsDatabaseUpgradeService extends AbstractSqlTsDatabaseUpgradeSe
197 197 break;
198 198 case "3.1.1":
199 199 try (Connection conn = DriverManager.getConnection(dbUrl, dbUserName, dbPassword)) {
  200 + log.info("Load TTL functions ...");
  201 + loadSql(conn, LOAD_TTL_FUNCTIONS_SQL);
200 202 log.info("Load Drop Partitions functions ...");
201 203 loadSql(conn, LOAD_DROP_PARTITIONS_FUNCTIONS_SQL);
202 204 }
... ...
... ... @@ -188,8 +188,8 @@ $$
188 188 DECLARE
189 189 tenant_cursor CURSOR FOR select tenant.id as tenant_id
190 190 from tenant;
191   - tenant_id_record varchar;
192   - customer_id_record varchar;
  191 + tenant_id_record uuid;
  192 + customer_id_record uuid;
193 193 tenant_ttl bigint;
194 194 customer_ttl bigint;
195 195 deleted_for_entities bigint;
... ...