Fix serverless save when name empty (#6720)
- fix serverless function error on save when name empty - remove useless unique constraint on serverless function names
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class RemoveServerlessFunctionUniqueConstraint1724423248330
|
||||
implements MigrationInterface
|
||||
{
|
||||
name = 'RemoveServerlessFunctionUniqueConstraint1724423248330';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "metadata"."serverlessFunction" DROP CONSTRAINT "IndexOnNameAndWorkspaceIdUnique"`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "metadata"."serverlessFunction" ADD CONSTRAINT "IndexOnNameAndWorkspaceIdUnique" UNIQUE ("name", "workspaceId")`,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user