-
Notifications
You must be signed in to change notification settings - Fork 2
Description
The commented out portion for the uuid strategy in the migration file (step 1) fails due to having the not null constraint.
await queryRunner.query(`ALTER TABLE "stock_movement" ADD "stockLocationId" uuid NOT NULL`);
should be
await queryRunner.query(`ALTER TABLE "stock_movement" ADD "stockLocationId" uuid`);
And the vendureV2Migrations function fails due to "product_variant_price.channelId" having the type "character varying" instead of uuid.
The subquery (SELECT "defaultCurrencyCode" FROM "channel" WHERE "id" = "channelId") needs channel id cast to uuid like (SELECT "defaultCurrencyCode" FROM "channel" WHERE "id" = "channelId"::uuid) when UUIDStrategy is used.
I don't think channelId should really be "character varying", it should probably be a foreign key with the type "uuid", but that isn't relevant to getting the migration to work.