fix: the email vaerification logic error

This commit is contained in:
mahyargdz
2025-02-26 15:25:18 +03:30
parent f8a1a7b784
commit 93c5ad49d3
320 changed files with 215 additions and 92 deletions
Regular → Executable
View File
Regular → Executable
View File
Regular → Executable
View File
@@ -0,0 +1,73 @@
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
export class AddBusinessFieldsToUserSubscription1740574122421 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.addColumns("user_subscription", [
new TableColumn({
name: "businessName",
type: "varchar",
length: "250",
isNullable: true,
default: "'Unknown Business'",
}),
new TableColumn({
name: "businessPhone",
type: "varchar",
length: "50",
isNullable: true,
default: "''",
}),
new TableColumn({
name: "description",
type: "text",
// length: "250",
isNullable: true,
default: "''",
}),
]);
await queryRunner.query(
`UPDATE "user_subscription" SET "businessName" = 'Unknown Business', "businessPhone" = '', "description" = '' WHERE "businessName" IS NULL`,
);
await queryRunner.changeColumn(
"user_subscription",
"businessName",
new TableColumn({
name: "businessName",
type: "varchar",
length: "250",
isNullable: false,
}),
);
await queryRunner.changeColumn(
"user_subscription",
"businessPhone",
new TableColumn({
name: "businessPhone",
type: "varchar",
length: "50",
isNullable: false,
}),
);
await queryRunner.changeColumn(
"user_subscription",
"description",
new TableColumn({
name: "description",
type: "text",
isNullable: false,
}),
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumns("user_subscription", [
new TableColumn({ name: "businessName", type: "varchar" }),
new TableColumn({ name: "businessPhone", type: "varchar" }),
new TableColumn({ name: "description", type: "text" }),
]);
}
}
View File
Regular → Executable
View File
Regular → Executable
View File
View File
View File
View File
Regular → Executable
View File