From f5ba97aa3d97e70c4b398aaef6b024f8212dc021 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Mon, 14 Mar 2022 13:52:42 +0100 Subject: [PATCH] fix(core): update --- package-lock.json | 14 +++++++------- package.json | 2 +- ts/smartclickhouse.classes.timedatatable.ts | 5 ++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index f65ac4e..e320633 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@depyronick/clickhouse-client": "^1.0.12", - "@pushrocks/smartobject": "^1.0.9" + "@pushrocks/smartobject": "^1.0.10" }, "devDependencies": { "@gitzone/tsbuild": "^2.1.25", @@ -2635,9 +2635,9 @@ } }, "node_modules/@pushrocks/smartobject": { - "version": "1.0.9", - "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartobject/-/smartobject-1.0.9.tgz", - "integrity": "sha512-74IlcVWhhEOsG7X65H4DmYP1o8HejZMWj5uATCk99A+XjZMi8UJu8H7EsgT++JJKkwLz2BKc9323BfNk1B79WA==", + "version": "1.0.10", + "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartobject/-/smartobject-1.0.10.tgz", + "integrity": "sha512-Tfhvy/XoYQ0e4Sl/ztvqJh+lxR9+zixHlnMPstYW05ZbRTZzC6lf1EZLcsmjiALkz6IDFNEwrMrwODlJIpjj+A==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -17723,9 +17723,9 @@ } }, "@pushrocks/smartobject": { - "version": "1.0.9", - "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartobject/-/smartobject-1.0.9.tgz", - "integrity": "sha512-74IlcVWhhEOsG7X65H4DmYP1o8HejZMWj5uATCk99A+XjZMi8UJu8H7EsgT++JJKkwLz2BKc9323BfNk1B79WA==", + "version": "1.0.10", + "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartobject/-/smartobject-1.0.10.tgz", + "integrity": "sha512-Tfhvy/XoYQ0e4Sl/ztvqJh+lxR9+zixHlnMPstYW05ZbRTZzC6lf1EZLcsmjiALkz6IDFNEwrMrwODlJIpjj+A==", "requires": { "fast-deep-equal": "^3.1.3", "minimatch": "^5.0.1" diff --git a/package.json b/package.json index 4135d7c..12b9235 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ }, "dependencies": { "@depyronick/clickhouse-client": "^1.0.12", - "@pushrocks/smartobject": "^1.0.9" + "@pushrocks/smartobject": "^1.0.10" }, "browserslist": [ "last 1 chrome versions" diff --git a/ts/smartclickhouse.classes.timedatatable.ts b/ts/smartclickhouse.classes.timedatatable.ts index 879cd46..ad19694 100644 --- a/ts/smartclickhouse.classes.timedatatable.ts +++ b/ts/smartclickhouse.classes.timedatatable.ts @@ -36,13 +36,12 @@ export class TimeDataTable { CREATE TABLE IF NOT EXISTS ${newTable.tableName} ( timestamp DateTime64(3, 'Europe/Berlin'), message String - ) ENGINE=MergeTree() ORDER BY timestamp - `); + ) ENGINE=MergeTree() ORDER BY timestamp`); // lets adjust the TTL await smartClickHouseDbRefArg.clickhouseClient .queryPromise(` - ALTER TABLE ${newTable.tableName} MODIFY TTL toDateTime(timestamp) + INTERVAL 1 MONTH; + ALTER TABLE ${newTable.tableName} MODIFY TTL toDateTime(timestamp) + INTERVAL 2 DAY `); await newTable.updateColumns();