commit for pushing in holding repo

This commit is contained in:
pooya
2026-02-19 16:19:43 +03:30
commit 2286156f6e
108 changed files with 18159 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
import { LanguageEnum } from "src/enums/language.enum";
import { MigrationInterface, QueryRunner, Table } from "typeorm";
export class CreateBlogsTranslationTable1763402732483 implements MigrationInterface {
name = "CreateBlogsTranslationTable1763402732483";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: "blogs_translation",
columns: [
{
name: "id",
type: "varchar",
isPrimary: true,
},
{
name: "title",
type: "varchar",
isNullable: false,
},
{
name: "description",
type: "varchar",
isNullable: false,
},
{
name: "editor",
type: "jsonb",
isNullable: false,
},
{
name: "language",
type: "enum",
isNullable: false,
enum: Object.values(LanguageEnum),
default: `'${LanguageEnum.Farsi}'`,
},
{
name: "blogId",
type: "varchar",
isNullable: false,
},
],
})
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropTable("blogs_translation");
}
}