import { MigrationInterface, QueryRunner } from "typeorm";

export class RenameSortOrderColumns1759053552602 implements MigrationInterface {

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.renameColumn("recipe_instruction_step", "sortOrder", "sort_order");
        await queryRunner.renameColumn("recipe_ingredient_group", "sortOrder", "sort_order");
        await queryRunner.renameColumn("recipe_ingredient", "sortOrder", "sort_order");
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.renameColumn("recipe_instruction_step", "sort_order", "sortOrder");
        await queryRunner.renameColumn("recipe_ingredient_group", "sort_order", "sortOrder");
        await queryRunner.renameColumn("recipe_ingredient", "sort_order", "sortOrder");
    }

}
