Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that the .mysql.tpl file is run for 5.3.alpha1 #12419

Merged
merged 1 commit into from
Jul 5, 2018

Conversation

seamuslee001
Copy link
Contributor

Overview

When we create the php upgrade function for a version we must make sure that the runsql is processed

ping @totten @colemanw @eileenmcnaughton @monishdeb @guanhuan

@civibot
Copy link

civibot bot commented Jul 5, 2018

(Standard links)

@eileenmcnaughton
Copy link
Contributor

@jmcclelland I know you have deployed for some sites - might want to check this - the sql was

{* file to handle db changes in 5.3.alpha1 during upgrade *}
ALTER TABLE civicrm_custom_group ALTER column is_multiple SET DEFAULT 0;
UPDATE civicrm_custom_group SET is_multiple = 0 WHERE is_multiple IS NULL;
ALTER TABLE civicrm_custom_group ALTER column is_active SET DEFAULT 1;
ALTER TABLE civicrm_custom_field ALTER column is_view SET DEFAULT 0;
UPDATE civicrm_custom_field SET is_view = 0 WHERE is_view IS NULL;
ALTER TABLE civicrm_custom_field ALTER column is_required SET DEFAULT 0;
UPDATE civicrm_custom_field SET is_required = 0 WHERE is_required IS NULL;
ALTER TABLE civicrm_custom_field ALTER column is_searchable SET DEFAULT 0;
UPDATE civicrm_custom_field SET is_searchable = 0 WHERE is_required IS NULL;
ALTER TABLE civicrm_custom_field ALTER column is_active SET DEFAULT 1;

SET @UKCountryId = (SELECT id FROM civicrm_country cc WHERE cc.name = 'United Kingdom');
INSERT INTO civicrm_state_province (country_id, abbreviation, name)
VALUES (@UKCountryId, 'MON', 'Monmouthshire');

{* dev/core/#152 *}
UPDATE `civicrm_custom_field` set `html_type` = "Multi-Select" WHERE `html_type` = "AdvMulti-Select";

@seamuslee001 all that sql could run again in the next upgrade version to be safe

@seamuslee001
Copy link
Contributor Author

@eileenmcnaughton the only one that would need to be conditional is the insert into as there is a unique key on that table

@eileenmcnaughton
Copy link
Contributor

@seamuslee001 I'd be find leaving that line out - the vast majority of sites will run the 5.3.0 update as barely anyone has installed it. The rest ... don't care about Wales :-) (I'll be shot for that)

@seamuslee001
Copy link
Contributor Author

@Eileen so are you thinking copy the steps into 5.3.0?

@eileenmcnaughton eileenmcnaughton merged commit 70be957 into civicrm:5.3 Jul 5, 2018
@eileenmcnaughton
Copy link
Contributor

@seamuslee001 no - I was confused - this is good

@eileenmcnaughton eileenmcnaughton deleted the 5.3 branch July 5, 2018 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants