HINT: You might need to specify "USING name::jsonb code example
Example: Datatype mismatch: 7 ERROR: column cannot be cast automatically to type integer
alter table a.attend alter column terminal TYPE INTEGER USING (terminal::integer) ;
alter table a.attend alter column terminal TYPE INTEGER USING (terminal::integer) ;