fix(core): update

This commit is contained in:
2022-03-14 13:52:42 +01:00
parent 73529b353c
commit f5ba97aa3d
3 changed files with 10 additions and 11 deletions

View File

@ -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();