Files v2 - FILES field update/create in common API (#17400)
## FILES Field update interface
```
mutation {
updateCompany(
id: "company-uuid"
data: {
filesfield: [
{ fileId: "new-file-uuid", label: "new-document.pdf" }
]
}
) {
id
filesfield {
fileId
label
extension
}
}
}
```
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
import { type MigrationInterface, type QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddFileSettingsColumnOnFileTable1769434782880
|
||||
implements MigrationInterface
|
||||
{
|
||||
name = 'AddFileSettingsColumnOnFileTable1769434782880';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "core"."file" ADD "settings" jsonb`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "core"."file" DROP COLUMN "settings"`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user