Remove non positive integer constraint on Nav Menu Item (#18081)
To fit with position typed field logic + Ease favorite to nav menu item migration (which have negative and float position)
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
import { type MigrationInterface, type QueryRunner } from 'typeorm';
|
||||
|
||||
export class ChangeNavigationMenuItemPositionToDoublePrecision1771499112046
|
||||
implements MigrationInterface
|
||||
{
|
||||
name = 'ChangeNavigationMenuItemPositionToDoublePrecision1771499112046';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."navigationMenuItem" ALTER COLUMN "position" TYPE double precision`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "core"."navigationMenuItem" ALTER COLUMN "position" TYPE integer`,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user