diff --git a/backend/src/entities/table-categories/table-categories.entity.ts b/backend/src/entities/table-categories/table-categories.entity.ts index 22f4ef083..66eefbfc5 100644 --- a/backend/src/entities/table-categories/table-categories.entity.ts +++ b/backend/src/entities/table-categories/table-categories.entity.ts @@ -9,7 +9,7 @@ export class TableCategoriesEntity { @Column({ type: 'varchar', length: 255 }) category_name: string; - @Column({ type: 'varchar', length: 255, nullable: false }) + @Column({ type: 'varchar', length: 255, nullable: true, default: null }) category_id: string; @Column({ type: 'varchar', length: 255, default: null, nullable: true }) diff --git a/backend/src/migrations/1761142678373-AddCategoryColorPropertyAndCategoryIdToTableCategoriesEntity.ts b/backend/src/migrations/1761305606579-AddCategoryColorPropertyAndCategoryIdToTableCategoriesEntity.ts similarity index 84% rename from backend/src/migrations/1761142678373-AddCategoryColorPropertyAndCategoryIdToTableCategoriesEntity.ts rename to backend/src/migrations/1761305606579-AddCategoryColorPropertyAndCategoryIdToTableCategoriesEntity.ts index 3dd6e2a73..d84ca94fa 100644 --- a/backend/src/migrations/1761142678373-AddCategoryColorPropertyAndCategoryIdToTableCategoriesEntity.ts +++ b/backend/src/migrations/1761305606579-AddCategoryColorPropertyAndCategoryIdToTableCategoriesEntity.ts @@ -1,10 +1,10 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; -export class AddCategoryColorPropertyAndCategoryIdToTableCategoriesEntity1761142678373 implements MigrationInterface { - name = 'AddCategoryColorPropertyAndCategoryIdToTableCategoriesEntity1761142678373'; +export class AddCategoryColorPropertyAndCategoryIdToTableCategoriesEntity1761305606579 implements MigrationInterface { + name = 'AddCategoryColorPropertyAndCategoryIdToTableCategoriesEntity1761305606579'; public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "table_categories" ADD "category_id" character varying(255) NOT NULL`); + await queryRunner.query(`ALTER TABLE "table_categories" ADD "category_id" character varying(255)`); await queryRunner.query(`ALTER TABLE "table_categories" ADD "category_color" character varying(255)`); }