drizzle-kit snapshot files malformed error

I’m getting snapshot “xxxx_snapshot.json data is malformed" errors trying to generate a schema change. The error appears for each of the existing snapshot files. There were no schema updates since June, so all of the snapshot files are what was generated by the version available at that time or earlier (checked-in as generated). The latest version appears not to be able to work with these files, as the error message appears for every snapshot. I tried downgrading to 0.19.13 but then I get an error that the version is outdated an to upgrade. Any recommended approach to get the snapshot files up-to-date?
1 Reply
tacomanator
tacomanatorOP13mo ago
I was able to resolve this. There was a composite primary key which had a columns property but not a name property. I manually added the name in the appropriate spot in all of the past snapshot files in which the corresponding key existed.
Want results from more Discord servers?
Add your server