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

update redcap_history_version at each install/upgrade #66

Open
pbchase opened this issue Nov 19, 2019 · 1 comment
Open

update redcap_history_version at each install/upgrade #66

pbchase opened this issue Nov 19, 2019 · 1 comment

Comments

@pbchase
Copy link
Contributor

pbchase commented Nov 19, 2019

At each upgrade, REDCap upgrade.php script adds or replaces a row in redcap_history_version. the fab deploy and upgrade tasks do not do that, but should. The line from REDCap we need to imitate is

REPLACE INTO redcap_history_version (`date`, redcap_version) values (CURDATE(), '$redcap_version');

With variables substituted, that line loks like this:

REPLACE INTO redcap_history_version (`date`, redcap_version) values (CURDATE(), '9.3.5');

Look for code to steal at

def set_redcap_config(field_name="", value=""):

@pbchase
Copy link
Contributor Author

pbchase commented Jan 30, 2024

FYI, this is the current behavior:

-- Set date of upgrade --
UPDATE redcap_config SET value = CURDATE() WHERE field_name = 'redcap_last_install_date';
REPLACE INTO redcap_history_version (`date`, redcap_version) values (CURDATE(), '14.1.3');
-- Set new version number --
UPDATE redcap_config SET value = '14.1.3' WHERE field_name = 'redcap_version';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants