Skygear Cloud Database Changing type of a DB field from `integer` to `varchar(10)`


#1

Original thread: https://skygear.slack.com/archives/C1AD5Q51R/p1514990741000674

Hi, I am having a problem changing the type of a field. We have a zipcode field that needed to change from integer to varchar(10). So I made this change in the postgres container using basic ALTER TABLE statements, but our app reports:

    error: 
     { name: 'IncompatibleSchema',
       code: 114,
       message: 'conflicting schema {TypeUnknown  {0 <nil>} character varying(10)} => {TypeString  {0 <nil>} }' } }

If I wipe out the database, the app works fine. Do I need to do something else to change a record’s underlying schema in-place? (edited)


#2

Sorry about the problem. The reason is varchar(10) is not supported yet. You can change integer to text in your case, which will be supported by skygear-server.

I have created an issue for this: https://github.com/SkygearIO/skygear-server/issues/516