Closed domiko closed 9 years ago
Hi.
I think that hibernate is not capable of modifying the column type even if you have set your DataSource.groovy
dbCreate
property to update
.
You can always modify the type of the column using pgAdmin or psql:
ALTER TABLE my_table ALTER COLUMN my_column_of_type_json TYPE jsonb USING my_column_of_type_json::jsonb;
Please note that the USING
clause is necessary because postgresql doesn't know how to convert directly from json to jsonb.
I hope this helps.
Thank Ivan for your very quick reply. Your tip works like a charm.
Thanks, Dominique
Great! :-)
Hi guys, Thanks for a great plugin.
I've tried re-mapping a gorm field from json to jsonb. However, pgAdmin still lists the field as json (not jsonb).
Regards