add : migration
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddSoftDeleteToUserSubscription1770464625677 implements MigrationInterface {
|
||||
name = 'AddSoftDeleteToUserSubscription1770464625677'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "user_subscription" ADD "deletedAt" TIMESTAMP WITH TIME ZONE`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "user_subscription" DROP COLUMN "deletedAt"`);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -38,6 +38,6 @@ export class UserSubscription extends BaseEntity {
|
||||
@JoinTable()
|
||||
staff: User[];
|
||||
|
||||
@DeleteDateColumn({ nullable: true })
|
||||
@DeleteDateColumn({ type: 'timestamptz', nullable: true })
|
||||
deletedAt?: Date;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user