Skip to content

Commit 120f546

Browse files
authored
feat(authorization): increase condition description length (#169)
1 parent 6fb4ec4 commit 120f546

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { MigrationInterface, QueryRunner } from 'typeorm';
2+
3+
export default class conditionDescriptionLength1707321571830 implements MigrationInterface {
4+
name = 'conditionDescriptionLength1707321571830';
5+
6+
public async up(queryRunner: QueryRunner): Promise<void> {
7+
await queryRunner.query(`ALTER TABLE "condition" DROP COLUMN "description"`);
8+
await queryRunner.query(
9+
`ALTER TABLE "condition" ADD "description" character varying(1000) NOT NULL DEFAULT ''`,
10+
);
11+
}
12+
13+
public async down(queryRunner: QueryRunner): Promise<void> {
14+
await queryRunner.query(`ALTER TABLE "condition" DROP COLUMN "description"`);
15+
await queryRunner.query(
16+
`ALTER TABLE "condition" ADD "description" character varying(255) NOT NULL DEFAULT ''`,
17+
);
18+
}
19+
}

microservices/authorization/src/entities/condition.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ class Condition {
3030
title: string;
3131

3232
@JSONSchema({
33-
description: 'Condition workflow description',
33+
description: 'Condition validation description',
34+
example: 'Validate if entity related to the user',
3435
})
35-
@Column({ type: 'varchar', length: 255, default: '' })
36-
@Length(3, 255)
36+
@Column({ type: 'varchar', length: 1000, default: '' })
37+
@Length(3, 1000)
3738
@IsUndefinable()
3839
description: string;
3940

0 commit comments

Comments
 (0)