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:
@@ -6,9 +6,9 @@ const connectionString = process.env.DATABASE_URL + "?ssl=true";
|
|||||||
const client = new Client({
|
const client = new Client({
|
||||||
connectionString: connectionString
|
connectionString: connectionString
|
||||||
});
|
});
|
||||||
client.connect(function(err, client, done){
|
client.connect(function(err, client, done) {
|
||||||
console.log(err)
|
console.log(err);
|
||||||
console.log(done)
|
console.log(done);
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("Successfully connected to Postgres");
|
console.log("Successfully connected to Postgres");
|
||||||
|
|||||||
@@ -200,7 +200,9 @@ function insertNewValue(parsedUserValue, ctx, key, type, fakeDate) {
|
|||||||
Question: questionText,
|
Question: questionText,
|
||||||
Type: type,
|
Type: type,
|
||||||
Value: parsedUserValue,
|
Value: parsedUserValue,
|
||||||
Source: "telegram"
|
Source: "telegram",
|
||||||
|
Importedat: moment(ctx.update.message.date * 1000),
|
||||||
|
Importid: null
|
||||||
};
|
};
|
||||||
postgres.client.query({
|
postgres.client.query({
|
||||||
text: "INSERT INTO raw_data (" +
|
text: "INSERT INTO raw_data (" +
|
||||||
|
|||||||
@@ -256,7 +256,9 @@ function insertNewValue(parsedUserValue, ctx, key, type, fakeDate = null) {
|
|||||||
Question: questionText,
|
Question: questionText,
|
||||||
Type: type,
|
Type: type,
|
||||||
Value: parsedUserValue,
|
Value: parsedUserValue,
|
||||||
Source: "telegram"
|
Source: "telegram",
|
||||||
|
Importedat: moment(ctx.update.message.date * 1000),
|
||||||
|
Importid: null
|
||||||
};
|
};
|
||||||
|
|
||||||
postgres.client.query(
|
postgres.client.query(
|
||||||
|
|||||||
Reference in New Issue
Block a user