hunk.code_window:         newTable.name = dbName ? `${dbName}.${newTableName}` : newTableName;
           // rename table
           upQueries.push(new Query(`RENAME TABLE ${this.escapePath(oldTable.name)} TO ${this.escapePath(newTable.name)}`));
           downQueries.push(new Query(`RENAME TABLE ${this.escapePath(newTable.name)} TO ${this.escapePath(oldTable.name)}`));
           // rename index constraints
           newTable.indices.forEach(index => {
               // build new constraint name
  
hunk.labels: keep keep keep keep replace replace keep keep keep keep
hunk.after_edit:         upQueries.push(new Query(`RENAME TABLE ${this.escapePath(oldTable)} TO ${this.escapePath(newTable)}`));
           downQueries.push(new Query(`RENAME TABLE ${this.escapePath(newTable)} TO ${this.escapePath(oldTable)}`));
  
hunk.file_path: src/driver/mysql/MysqlQueryRunner.ts
hunk.type: replace
file: import "reflect-metadata";
  
  import { Connection } from "../../../src/connection/Connection";
  import {
      closeTestingConnections,
      createTestingConnections,
      reloadTestingDatabases,
  } from "../../utils/test-utils";
  import { Bar } from "./entity/Bar";
  import { Foo } from "./entity/Foo";
  
  describe("github issues > #7002 cascade save fails if the child entity has CreateDateColumn and PK as JoinColumn", () => {
      let connections: Connection[];
      before(
          async () =>
              (connections = await createTestingConnections({
                  entities: [__dirname + "/entity/*{.js,.ts}"],
                  schemaCreate: true,
                  dropSchema: true,
                  enabledDrivers: ["mysql", "postgres"],
              }))
      );
      beforeEach(() => reloadTestingDatabases(connections));
      after(() => closeTestingConnections(connections));
  
      it("save an entity having a child entity with shared PK and CreatedDateColumn by cascade", () =>
          Promise.all(
              connections.map(async (connection) => {
                  const foo = new Foo();
                  foo.text = "This is a feature post";
  
                  await connection.manager.save(
                      connection.getRepository(Bar).create({
                          title: "Feature Post",
                          foo,
                      })
                  );
              })
          ));
  });
  