feat: handle google login

This commit is contained in:
Abdalhamid Alhamad
2025-01-09 15:14:09 +03:00
parent db02a28b4d
commit 756e947c8a
10 changed files with 210 additions and 22 deletions
@@ -0,0 +1,19 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddFlagsToUserEntity1736414850257 implements MigrationInterface {
name = 'AddFlagsToUserEntity1736414850257';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "users" ADD "is_phone_verified" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "users" ADD "is_email_verified" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "users" ALTER COLUMN "phone_number" DROP NOT NULL`);
await queryRunner.query(`ALTER TABLE "users" ALTER COLUMN "country_code" DROP NOT NULL`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "users" ALTER COLUMN "country_code" SET NOT NULL`);
await queryRunner.query(`ALTER TABLE "users" ALTER COLUMN "phone_number" SET NOT NULL`);
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "is_email_verified"`);
await queryRunner.query(`ALTER TABLE "users" DROP COLUMN "is_phone_verified"`);
}
}
+1
View File
@@ -17,3 +17,4 @@ export * from './1734503895302-create-money-request-entity';
export * from './1734601976591-create-allowance-entities';
export * from './1734861516657-create-gift-entities';
export * from './1734944692999-create-notification-entity-and-edit-device';
export * from './1736414850257-add-flags-to-user-entity';