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,17 @@
import { MigrationInterface, QueryRunner, TableColumn } from "typeorm";
export class AddFieldsToBlogs1763476513917 implements MigrationInterface {
name = "AddFieldsToBlogs1763476513917";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.addColumns("blogs", [
new TableColumn({ name: "featuredImage", type: "varchar", isNullable: true }),
new TableColumn({ name: "gallery", type: "jsonb", isNullable: true, default: "'[]'::jsonb" }),
new TableColumn({ name: "publishedAt", type: "timestamp", isNullable: true, default: null }),
]);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumns("blogs", ["featuredImage", "gallery", "publishedAt"]);
}
}