diff --git a/database/migrations/.snapshot-dzone-db.json b/database/migrations/.snapshot-dzone-db.json index a2f3f34..6e6d2f1 100644 --- a/database/migrations/.snapshot-dzone-db.json +++ b/database/migrations/.snapshot-dzone-db.json @@ -3646,8 +3646,8 @@ "default": "false", "mappedType": "boolean" }, - "rent_contract_images": { - "name": "rent_contract_images", + "contract_images": { + "name": "contract_images", "type": "jsonb", "unsigned": false, "autoincrement": false, diff --git a/database/migrations/Migration20260405072136.ts b/database/migrations/Migration20260405072136.ts new file mode 100644 index 0000000..0c8fbf8 --- /dev/null +++ b/database/migrations/Migration20260405072136.ts @@ -0,0 +1,13 @@ +import { Migration } from '@mikro-orm/migrations'; + +export class Migration20260405072136 extends Migration { + + override async up(): Promise { + this.addSql(`alter table "company" rename column "rent_contract_images" to "contract_images";`); + } + + override async down(): Promise { + this.addSql(`alter table "company" rename column "contract_images" to "rent_contract_images";`); + } + +} diff --git a/src/modules/companies/DTO/create-company.dto.ts b/src/modules/companies/DTO/create-company.dto.ts index d2317ac..d1b8ea8 100644 --- a/src/modules/companies/DTO/create-company.dto.ts +++ b/src/modules/companies/DTO/create-company.dto.ts @@ -97,7 +97,6 @@ export class CreateCompanyDto extends PickType(CompleteRegistrationDto, ["phone" rentEndAt?: string; @IsArray() - @ValidateNested({ each: true }) @ApiProperty({ description: " یا سند تصاویر قرارداد اجاره" }) contractImages: string[];