File tree Expand file tree Collapse file tree
libs/shared/db-layer/src/query Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -485,7 +485,6 @@ export class MysqlQueryService extends BaseQueryService {
485485 const entryRef = useVars ? '@ENTRY' : this . toSqlValue ( newId ) ;
486486
487487 const query =
488- `-- Copy ${ tableName } entry from ${ sourceRef } to ${ entryRef } \n` +
489488 `DELETE FROM \`${ tableName } \` WHERE \`${ idField } \` = ${ entryRef } ;\n` +
490489 `CREATE TEMPORARY TABLE temp_copy_table AS\n` +
491490 ` SELECT * FROM \`${ tableName } \` WHERE \`${ idField } \` = ${ sourceRef } ;\n` +
@@ -533,7 +532,6 @@ export class MysqlQueryService extends BaseQueryService {
533532 const selectList = columns . map ( ( col ) => ( col === idField ? `${ entryRef } AS \`${ col } \`` : `\`${ col } \`` ) ) . join ( ', ' ) ;
534533
535534 const query =
536- `-- Copy ${ tableName } entry from ${ sourceRef } to ${ entryRef } \n` +
537535 `DELETE FROM \`${ tableName } \` WHERE \`${ idField } \` = ${ entryRef } ;\n` +
538536 `INSERT INTO \`${ tableName } \` (${ columnList } )\n` +
539537 ` SELECT ${ selectList } \n` +
@@ -556,8 +554,7 @@ export class MysqlQueryService extends BaseQueryService {
556554 const entryRef = useVars ? '@ENTRY' : this . toSqlValue ( newId ) ;
557555
558556 // Always include DELETE against the destination entry
559- let query =
560- `-- Copy ${ tableName } entry from source to ${ entryRef } \n` + `DELETE FROM \`${ tableName } \` WHERE \`${ idField } \` = ${ entryRef } ;\n` ;
557+ let query = `DELETE FROM \`${ tableName } \` WHERE \`${ idField } \` = ${ entryRef } ;\n` ;
561558
562559 if ( ! rows || rows . length === 0 ) {
563560 // Nothing to insert, return only the delete statement
You can’t perform that action at this time.
0 commit comments