datocms / cli

Official CLI to interact with DatoCMS projects!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migration autogeneration fails if the source environment is empty

illarionvk opened this issue · comments

The autogenerate command fails with a TypeError: Cannot read properties of undefined (reading 'filter') error if the source (primary) environment has no models or blocks.

The command completed successfully as soon as I created a model in the primary environment.

Example command:

# `next` is the name of the sandbox environment
datocms migrations:new 'add company' --ts --autogenerate='next'
Screenshot 2023-06-26 at 16 51 24

I can see that the issue is addressed in this commit; but v1.1.8 release is yet not available on npm.

Sorry for the inconvenience, please try with v1.1.9!