# Production module upgrade on postgres has invalid SQL

**URL:** <https://forum.inductiveautomation.com/t/production-module-upgrade-on-postgres-has-invalid-sql/12234>\
**Category:** Ignition\
**Created:** [October 13, 2016, 10:36pm UTC](https://forum.inductiveautomation.com/t/production-module-upgrade-on-postgres-has-invalid-sql/12234 "2016-10-13T22:36:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gekkoman](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gekkoman](https://forum.inductiveautomation.com/u/gekkoman)\
**Post date:** [October 13, 2016, 10:36pm UTC](https://forum.inductiveautomation.com/t/production-module-upgrade-on-postgres-has-invalid-sql/12234/1 "2016-10-13T22:36:13Z")

</div>

When upgrading a production model from 7.7 to 7.9 it wishes to alter types of some columns.

These are missing the TYPE keyword on the column name and this prevents production model from validating.

In my case the corrected statements were:

ALTER TABLE REC\_ProdItemValue ALTER COLUMN “Name” TYPE varchar(255 )  
ALTER TABLE REC\_SubProdItemValue ALTER COLUMN “Value” TYPE varchar (1024 )  
ALTER TABLE REC\_RecipeValue ALTER COLUMN “Value” TYPE varchar (1024 )  
ALTER TABLE REC\_ChangeLog ALTER COLUMN “FromValue” TYPE varchar (1024 )  
ALTER TABLE REC\_ChangeLog ALTER COLUMN “ToValue” TYPE varchar (1024 )

On postgres 9.5.3
