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

sql/test_data_second_domain.mysql - Always use matching version #17734

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Civi/Test/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function populate() {
if (\Civi\Test::execute($query2) === FALSE) {
throw new RuntimeException("Cannot load civicrm_data.mysql. Aborting.");
}
print_r(\Civi\Test::pdo()->query("SELECT id, version FROM civicrm_domain")->fetchAll());
if (\Civi\Test::execute($query3) === FALSE) {
throw new RuntimeException("Cannot load test_data.mysql. Aborting.");
}
Expand Down
4 changes: 2 additions & 2 deletions sql/test_data_second_domain.mysql
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SELECT @domainVersion := version FROM civicrm_domain LIMIT 1;
SET @domainName := 'Second Domain';
INSERT INTO civicrm_contact(sort_name, display_name, contact_type, organization_name)
VALUES (@domainName, @domainName, 'Organization', @domainName);
Expand Down Expand Up @@ -27,7 +28,7 @@ INSERT INTO civicrm_loc_block ( address_id, email_id, phone_id, address_2_id, em
SELECT @locBlockId := id from civicrm_loc_block where phone_id = @phoneId AND email_id = @emailId AND address_id = @addId;

INSERT INTO civicrm_domain
(name, version,contact_id) VALUES (@domainName, '4.2', @contactID);
(name, version,contact_id) VALUES (@domainName, @domainVersion, @contactID);
SELECT @domainID := id FROM civicrm_domain where name = 'Second Domain';
INSERT INTO
`civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `domain_id`, `visibility_id`)
Expand Down Expand Up @@ -963,4 +964,3 @@ INSERT INTO civicrm_navigation
VALUES
( @domainID, CONCAT('civicrm/report/instance/', @instanceID,'&reset=1'), 'Mailing Detail Report', 'Mailing Detail Report', 'administer CiviMail', 'OR', @reportlastID, '1', NULL, @instanceID+2 );
UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @instanceID;
UPDATE civicrm_domain SET version = '5.28.alpha1';