Don’t resolve the error with sql command, resolve it with migration, or update your column type in schema.
You might also want to check this post (Postgrex.Error) ERROR 42804 (datatype_mismatch): column "" cannot be cast automatically to type integer.