mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
Escape column names
This commit is contained in:
parent
ac1e781fb1
commit
ea731a9485
|
@ -13,9 +13,11 @@ export class SeparateExecutionCreationFromStart1726218295879 implements Reversib
|
|||
await dropNotNull('execution_entity', 'startedAt');
|
||||
|
||||
const executionEntity = escape.tableName('execution_entity');
|
||||
const createdAt = escape.columnName('createdAt');
|
||||
const startedAt = escape.columnName('startedAt');
|
||||
|
||||
// inaccurate for pre-migration rows but prevents `createdAt` from being nullable
|
||||
await runQuery(`UPDATE ${executionEntity} SET createdAt = startedAt;`);
|
||||
await runQuery(`UPDATE ${executionEntity} SET ${createdAt} = ${startedAt};`);
|
||||
}
|
||||
|
||||
async down({ schemaBuilder: { dropColumns, addNotNull } }: MigrationContext) {
|
||||
|
|
Loading…
Reference in a new issue