add: rent fields to company

This commit is contained in:
2026-03-16 09:33:22 +03:30
parent 2babd20419
commit cec2d85801
5 changed files with 65 additions and 3 deletions
@@ -3636,6 +3636,35 @@
"default": "true",
"mappedType": "boolean"
},
"is_rented": {
"name": "is_rented",
"type": "boolean",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": false,
"default": "false",
"mappedType": "boolean"
},
"rent_contract_images": {
"name": "rent_contract_images",
"type": "jsonb",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"mappedType": "json"
},
"rent_end_at": {
"name": "rent_end_at",
"type": "timestamptz",
"unsigned": false,
"autoincrement": false,
"primary": false,
"nullable": true,
"length": 6,
"mappedType": "datetime"
},
"status": {
"name": "status",
"type": "company_status",
@@ -0,0 +1,9 @@
import { Migration } from '@mikro-orm/migrations';
export class Migration20260316055843 extends Migration {
override async up(): Promise<void> {
this.addSql(`alter table "company" add column "is_rented" boolean not null default false, add column "rent_contract_images" jsonb null, add column "rent_end_at" timestamptz null;`);
}
}