'PlanetScale: cannot unmarshal number into Go struct field

When I try to connect to my PlanetScale database using the CLI, I get a 'cannot unmarshal number into Go struct field' error.

CLI command to connect to db

pscale connect <db_name> <branch_name> --port 3310

Error response

Error: json: cannot unmarshal number into Go struct field DatabaseBranch.dev of type bool



Solution 1:[1]

Turns out this issue was caused because of a raw SQL insert that inputted 1 into a boolean field instead of true. Running an SQL update command to replace the 1s with true solved the issue.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 yeoman