/* Bug 8533: Altering fields_meta_data to increase length of default_value column from 255 to 2000 */
ALTER TABLE fields_meta_data   modify COLUMN default_value varchar(2000)  NULL ;

/*Bug 8533: Creating steps_c field for Contacts module */
INSERT INTO `fields_meta_data` VALUES ('Contactssteps_c','steps_c','LBL_STEPS',NULL,NULL,'Contacts','text',NULL,0,'[{\"id\":1,\"fromstep\":1,\"tostep\":3,\"probability\":40},{\"id\":2,\"fromstep\":1,\"tostep\":6,\"probability\":60},{\"id\":3,\"fromstep\":2,\"tostep\":3,\"probability\":60},{\"id\":4,\"fromstep\":2,\"tostep\":1,\"probability\":20},{\"id\":5,\"fromstep\":3,\"tostep\":2,\"probability\":60},{\"id\":6,\"fromstep\":3,\"tostep\":1,\"probability\":20},{\"id\":7,\"fromstep\":4,\"tostep\":2,\"probability\":20},{\"id\":8,\"fromstep\":4,\"tostep\":2,\"probability\":20},{\"id\":9,\"fromstep\":9,\"tostep\":8,\"probability\":80},{\"id\":10,\"fromstep\":9,\"tostep\":1,\"probability\":40},{\"id\":11,\"fromstep\":4,\"tostep\":8,\"probability\":60},{\"id\":12,\"fromstep\":4,\"tostep\":5,\"probability\":40},{\"id\":13,\"fromstep\":10,\"tostep\":6,\"probability\":60},{\"id\":14,\"fromstep\":10,\"tostep\":7,\"probability\":40},{\"id\":15,\"fromstep\":11,\"tostep\":3,\"probability\":60},{\"id\":16,\"fromstep\":11,\"tostep\":1,\"probability\":20},{\"id\":17,\"fromstep\":3,\"tostep\":11,\"probability\":60},{\"id\":18,\"fromstep\":4,\"tostep\":11,\"probability\":20},{\"id\":19,\"fromstep\":4,\"tostep\":11,\"probability\":20}]','2014-06-18 13:19:53',0,0,0,0,1,'true',NULL,'4','20',NULL);

/* Bug 8533: Altering contacts_cstm tbl to add steps_c field */
ALTER TABLE contacts_cstm add COLUMN steps_c text NULL ;

/* Bug 8533: UPDATE query to update steps_c for all Contacts*/
update contacts_cstm set steps_c='[{"id":1,"fromstep":1,"tostep":3,"probability":40},{"id":2,"fromstep":1,"tostep":6,"probability":60},{"id":3,"fromstep":2,"tostep":3,"probability":60},{"id":4,"fromstep":2,"tostep":1,"probability":20},{"id":5,"fromstep":3,"tostep":2,"probability":60},{"id":6,"fromstep":3,"tostep":1,"probability":20},{"id":7,"fromstep":4,"tostep":2,"probability":20},{"id":8,"fromstep":4,"tostep":2,"probability":20},{"id":9,"fromstep":9,"tostep":8,"probability":80},{"id":10,"fromstep":9,"tostep":1,"probability":40},{"id":11,"fromstep":4,"tostep":8,"probability":60},{"id":12,"fromstep":4,"tostep":5,"probability":40},{"id":13,"fromstep":10,"tostep":6,"probability":60},{"id":14,"fromstep":10,"tostep":7,"probability":40},{"id":15,"fromstep":11,"tostep":3,"probability":60},{"id":16,"fromstep":11,"tostep":1,"probability":20},{"id":17,"fromstep":3,"tostep":11,"probability":60},{"id":18,"fromstep":4,"tostep":11,"probability":20},{"id":19,"fromstep":4,"tostep":11,"probability":20}]';
