migration

This commit is contained in:
2026-04-05 10:53:07 +03:30
parent cd1e93d3a8
commit 0bd72fac0f
3 changed files with 15 additions and 3 deletions
+2 -2
View File
@@ -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,
@@ -0,0 +1,13 @@
import { Migration } from '@mikro-orm/migrations';
export class Migration20260405072136 extends Migration {
override async up(): Promise<void> {
this.addSql(`alter table "company" rename column "rent_contract_images" to "contract_images";`);
}
override async down(): Promise<void> {
this.addSql(`alter table "company" rename column "contract_images" to "rent_contract_images";`);
}
}
@@ -97,7 +97,6 @@ export class CreateCompanyDto extends PickType(CompleteRegistrationDto, ["phone"
rentEndAt?: string;
@IsArray()
@ValidateNested({ each: true })
@ApiProperty({ description: " یا سند تصاویر قرارداد اجاره" })
contractImages: string[];