Spaces:
Sleeping
Sleeping
import { MigrationInterface, QueryRunner } from "typeorm"; | |
export class NamePhoneNotNullable1729864559594 implements MigrationInterface { | |
name = 'NamePhoneNotNullable1729864559594' | |
public async up(queryRunner: QueryRunner): Promise<void> { | |
await queryRunner.query(`ALTER TABLE "users" ALTER COLUMN "full_name" SET NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "users" ALTER COLUMN "phone_number" SET NOT NULL`); | |
} | |
public async down(queryRunner: QueryRunner): Promise<void> { | |
await queryRunner.query(`ALTER TABLE "users" ALTER COLUMN "phone_number" DROP NOT NULL`); | |
await queryRunner.query(`ALTER TABLE "users" ALTER COLUMN "full_name" DROP NOT NULL`); | |
} | |
} | |