Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- I don't share this fact often, but SugarCRM fields can change types if you do it from the database. Assuming there are no vardefs specifying otherwise, here's how I converted a set of dropdown (enum) fields to open-text (varchar) fields...
- Caution, though! You can lose data if your change data types or shorten a field in a live database. Use your head. There's a reason the SugarCRM Studio doesn't do this for you.
- */
- update fields_meta_data set
- ext1=null,
- type='varchar',
- len = 255,
- default_value = ''
- where id in(
- 'A1_Poolskimmer_manufacturer_c',
- 'A1_Poolskimmer_model_number_c',
- 'A1_Poolskimmer_basket_size_c',
- 'A1_Poolskimmer_door_size_c',
- 'A1_Poolnumber_of_inlets_c',
- 'A1_Poolautomatic_pool_cleaner_manuf_c',
- 'A1_Poolautormatic_pool_cleaner_mode_c',
- 'A1_Poolpump_manufacturer_c',
- 'A1_Poolpump_model_number_c',
- 'A1_Poolfilter_model_number_c',
- 'A1_Poolfilter_size_c',
- 'A1_Poolheater_manufacturer_c',
- 'A1_Poolheater_model_number_c',
- 'A1_Poolchlorinator_manufacturer_c',
- 'A1_Poolchlorinator_model_number_c',
- 'A1_Poolfeeder_manufacturer_c',
- 'A1_Poolfeeder_model_number_c'
- );
- alter table a1_pool_cstm modify skimmer_manufacturer_c VARCHAR(255);
- alter table a1_pool_cstm modify skimmer_model_number_c VARCHAR(255);
- alter table a1_pool_cstm modify skimmer_basket_size_c VARCHAR(255);
- alter table a1_pool_cstm modify skimmer_door_size_c VARCHAR(255);
- alter table a1_pool_cstm modify number_of_inlets_c VARCHAR(255);
- alter table a1_pool_cstm modify automatic_pool_cleaner_manuf_c VARCHAR(255);
- alter table a1_pool_cstm modify autormatic_pool_cleaner_mode_c VARCHAR(255);
- alter table a1_pool_cstm modify pump_manufacturer_c VARCHAR(255);
- alter table a1_pool_cstm modify pump_model_number_c VARCHAR(255);
- alter table a1_pool_cstm modify filter_model_number_c VARCHAR(255);
- alter table a1_pool_cstm modify filter_size_c VARCHAR(255);
- alter table a1_pool_cstm modify heater_manufacturer_c VARCHAR(255);
- alter table a1_pool_cstm modify heater_model_number_c VARCHAR(255);
- alter table a1_pool_cstm modify chlorinator_manufacturer_c VARCHAR(255);
- alter table a1_pool_cstm modify chlorinator_model_number_c VARCHAR(255);
- alter table a1_pool_cstm modify feeder_manufacturer_c VARCHAR(255);
- alter table a1_pool_cstm modify feeder_model_number_c VARCHAR(255);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement