question

oskar avatar image
oskar asked

PlayFabPowerTools (CLI) fails to migrate my Catalog

Hi,

I'm trying out migration of a title and it migrates title data and cloud script etc just fine but when migrating the Catalog it prints a bunch of errors like this:

"Drop table 'dt_common_1' refers to unknown catalog item 'item_x'"

- - -

"Save Catalog Failed, skipping."

I can confirm all items do exist in the Catalog it tries to migrate so that is not the actual problem here. Could it be a bug in the tool? In that it tries to migrate drop tables before items or something?

The migration is from 78CC -> 1D80 if that's of any help.

Best regards, Oskar

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image
Seth Du answered

Does the target title (1D80) already have the catalog version with the same catalog version ID?

Can you also try to manually migrate this part to the new title(via API calls or downloading and importing JSON file)? Will the error occur?

What the CLI does is simply calling GetCatalogItems API to retrieve catalog data, then SetCatalogItems is called to set data.

This error occurs once during my former tests but it cannot be reproduced, hence I want to know if it is an issue caused by something at the backend of your title, but for now, I have done more tests on CLI and there is no reproduction.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

oskar avatar image oskar commented ·

The target did have a catalog already, tho I'm not sure about the version ID since I had already deleted it before reading your comment here.

Trying to migrate with the target title not having a catalog at all resulted in the same errors unfortunately. Then I tried the manual export/upload of the catalog json that you suggested and that expectedly worked just fine. Also, after having done that, the CLI migration now also works!

What you suggested regarding catalog version Id's might very well have been the underlying issue, tho it's hard to know for sure now.

Thank you for your reply, it was definitely helpful!

1 Like 1 ·
Toni Palm avatar image
Toni Palm answered

The CLI tool is unable to handle cases where there are dependencies to drop tables from the catalog. An "improvement" has been promised some two years ago...

Anyway, I ended up building my own migration tool, just a node.js script that is able to handle this stuff. What you need to do is to

(0. Fetch the catalog and drop tables from source)

1. Upload the catalog without drop table references

2. Upload the drop tables

3. Upload the catalog again, this time with the references in place

It's pretty simple, took just a few hours to implement this for all the configurations.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Toni Palm avatar image Toni Palm commented ·

I do see the reference is from drop table -> catalog, but this should work with that case too

0 Likes 0 ·
oskar avatar image oskar commented ·

Wouldn't surprise me if we end up having to do something like this too. At the moment migration works but I fear that as soon as we make any changes to drop tables it will break down again. Also just noticed that our Stores do not sync properly. One time it synced 2 out of 3 stores but without the store Display names. Then I cleared the stores and set them up again because one of them referenced item not from the Main catalog. After this no stores are migrated by the tool, and no errors. Feels like this tool is in need of some love to be useful. Now we're at a stage where we can't really trust it, which really sucks.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.