import { MigrationInterface, QueryRunner } from "typeorm";

export class Migrations1747810233954 implements MigrationInterface {
    name = 'Migrations1747810233954'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE "social_media_posts" ALTER COLUMN "is_uploaded_on_s3" DROP NOT NULL`);
        await queryRunner.query(`ALTER TABLE "social_media_posts" ALTER COLUMN "is_uploaded_on_s3" DROP DEFAULT`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE "social_media_posts" ALTER COLUMN "is_uploaded_on_s3" SET DEFAULT false`);
        await queryRunner.query(`ALTER TABLE "social_media_posts" ALTER COLUMN "is_uploaded_on_s3" SET NOT NULL`);
    }

}
