hunk.code_window:             if (dataSource) await dataSource.destroy()
               PlatformTools.logCmdErr("Error during migration revert:", err)
               process.exit(1)
           }
       }
  
hunk.labels: keep keep replace keep keep keep
hunk.file_path: src/commands/MigrationRevertCommand.ts
hunk.type: replace
file: import {
      CreateDateColumn,
      Entity,
      ManyToOne,
      PrimaryColumn,
  } from "../../../../src"
  import { Category } from "./Category"
  import { Post } from "./Post"
  
  @Entity()
  export class PostCategory {
      @ManyToOne(() => Post)
      post!: Promise<Post>
      @PrimaryColumn()
      postId!: Post["id"]
  
      @ManyToOne(() => Category)
      category!: Promise<Category>
      @PrimaryColumn()
      categoryId!: Category["id"]
  
      @CreateDateColumn()
      added!: Date
  }
  