import { MigrationInterface, QueryRunner } from "typeorm";

export class Migrations1729681998516 implements MigrationInterface {
    name = 'Migrations1729681998516'

    public async up(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE "users" ADD "country" character varying NOT NULL DEFAULT ''`);
        await queryRunner.query(`ALTER TABLE "users" ADD "total_followers" integer NOT NULL DEFAULT '0'`);
        await queryRunner.query(`COMMENT ON COLUMN "users"."total_followers" IS 'All platform Followers'`);
        await queryRunner.query(`ALTER TABLE "users" ADD "total_following" integer NOT NULL DEFAULT '0'`);
        await queryRunner.query(`COMMENT ON COLUMN "users"."total_following" IS 'All platform Following'`);
        await queryRunner.query(`ALTER TABLE "users" ADD "engegment_ratio" character varying NOT NULL DEFAULT '0.0'`);
    }

    public async down(queryRunner: QueryRunner): Promise<void> {
        await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "engegment_ratio"`);
        await queryRunner.query(`COMMENT ON COLUMN "users"."total_following" IS 'All platform Following'`);
        await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "total_following"`);
        await queryRunner.query(`COMMENT ON COLUMN "users"."total_followers" IS 'All platform Followers'`);
        await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "total_followers"`);
        await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "country"`);
    }

}
