Commit f510b142a786cd755344924f003913efb05db4c2

Authored by Dmytro Shvaika
Committed by Andrew Shvayka
1 parent f647c69f

fix cleanup_timeseries_by_ttl procedure

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