Skip to content

Commit 30f4a9d

Browse files
committed
Work around #4169
1 parent 6996cec commit 30f4a9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/gitpod-db/src/typeorm/transformer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export namespace Transformer {
2727
export const MAP_ISO_STRING_TO_TIMESTAMP_DROP: ValueTransformer = {
2828
to(value: any): any {
2929
// DROP all input values as they are set by the DB 'ON UPDATE'/ as default value
30-
return undefined;
30+
// HACK: Emulate `ON UPDATE CURRENT_TIMESTAMP(6)` to work around https://github.com/gitpod-io/gitpod/issues/4169
31+
return new Date().toISOString().replace('T', ' ').replace('Z', '000');
3132
},
3233
from(value: any): any {
3334
// From TIMESTAMP to ISO string

0 commit comments

Comments
 (0)