Skip to content

Commit

Permalink
Explain why we set updatedAt manually
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyi committed Nov 1, 2024
1 parent 26540f1 commit 8d720bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions db/model/Variable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ export async function updateGrapherConfigETLOfVariable(
variableId,
})

// Set the updatedAt manually instead of letting the DB do it so it is the
// same across different tables. The inconsistency caused issues in the
// past in chart-sync.
const now = new Date()

if (variable.etl) {
Expand Down Expand Up @@ -478,6 +481,9 @@ export async function updateGrapherConfigAdminOfVariable(
patchConfigAdmin
)

// Set the updatedAt manually instead of letting the DB do it so it is the
// same across different tables. The inconsistency caused issues in the
// past in chart-sync.
const now = new Date()

if (variable.admin) {
Expand Down

0 comments on commit 8d720bb

Please sign in to comment.