1
0
mirror of https://github.com/elisspace/FxLifeSheet.git synced 2026-08-29 15:44:00 +00:00

Add new columns to worker

This commit is contained in:
Felix Krause
2021-11-05 11:07:41 +01:00
parent 78da124268
commit 30d94156c4
3 changed files with 9 additions and 5 deletions

View File

@@ -6,9 +6,9 @@ const connectionString = process.env.DATABASE_URL + "?ssl=true";
const client = new Client({
connectionString: connectionString
});
client.connect(function(err, client, done){
console.log(err)
console.log(done)
client.connect(function(err, client, done) {
console.log(err);
console.log(done);
});
console.log("Successfully connected to Postgres");

View File

@@ -200,7 +200,9 @@ function insertNewValue(parsedUserValue, ctx, key, type, fakeDate) {
Question: questionText,
Type: type,
Value: parsedUserValue,
Source: "telegram"
Source: "telegram",
Importedat: moment(ctx.update.message.date * 1000),
Importid: null
};
postgres.client.query({
text: "INSERT INTO raw_data (" +

View File

@@ -256,7 +256,9 @@ function insertNewValue(parsedUserValue, ctx, key, type, fakeDate = null) {
Question: questionText,
Type: type,
Value: parsedUserValue,
Source: "telegram"
Source: "telegram",
Importedat: moment(ctx.update.message.date * 1000),
Importid: null
};
postgres.client.query(