From 10822532975ff2e0a0b730543d83fa327a1f86b5 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 29 Oct 2014 15:04:47 +0100 Subject: [PATCH] Bug 13068: Db rev for new syspref DevUpdateControl Content-Type: text/plain; charset=utf-8 This patch updates sysprefs.sql and admin.pref for the new syspref DevUpdateControl. Also it adds a atomic update file to insert the pref. NOTE FOR SIGNOFF: If you did not yet create this pref manually when testing this feature, updatedatabase will not yet pickup this db rev (since it is in PROD mode by default). See test plan. NOTE TO RM: Please add the atomic update 13068 to updatedatabase.pl by pasting the next line and correcting the version(!): ExecDBRev( $aupd, '13068', 'New syspref DevUpdateControl', '13068_DevUpdateControl.sql', '3.17.00.???'); And indeed, update kohaversion.pl. Test plan: [1] Run sysprefs.sql (perhaps partially?). Delete the pref again. [2] Add the above line to updatedatabase and correct the version. Also update kohaversion.pl. Run updatestructure. Did you see the DevUpdateControl dbrev? Remove the line again from updatedatabase. Reset kohaversion.pl. [3] Run updatestructure again. Nothing to be done (PROD mode). [4] Change to ALWAYS mode. Update again. Double insert warn expected. Signed-off-by: Marcel de Rooy --- .../mysql/atomicupdate/13068_DevUpdateControl.sql | 1 + installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/admin.pref | 10 ++++++++++ 3 files changed, 12 insertions(+), 0 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/13068_DevUpdateControl.sql diff --git a/installer/data/mysql/atomicupdate/13068_DevUpdateControl.sql b/installer/data/mysql/atomicupdate/13068_DevUpdateControl.sql new file mode 100644 index 0000000..7baef0f --- /dev/null +++ b/installer/data/mysql/atomicupdate/13068_DevUpdateControl.sql @@ -0,0 +1 @@ +INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('DevUpdateControl','PROD','PROD|RESET|ALWAYS|TRACK','Controls how development updates from atomicupdate folder are handled','Choice'); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index e881086..fcec620 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -99,6 +99,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('defaultSortField','relevance','relevance|popularity|call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'), ('defaultSortOrder','dsc','asc|dsc|az|za','Specify the default sort order','Choice'), ('delimiter',';',';|tabulation|,|/|\\|#||','Define the default separator character for exporting reports','Choice'), +('DevUpdateControl','PROD','PROD|RESET|ALWAYS|TRACK','Controls how development updates from atomicupdate folder are handled','Choice'), ('Display856uAsImage','OFF','OFF|Details|Results|Both','Display the URI in the 856u field as an image, the corresponding Staff Client XSLT option must be on','Choice'), ('DisplayClearScreenButton','0','','If set to ON, a clear screen button will appear on the circulation page.','YesNo'), ('displayFacetCount','0',NULL,NULL,'YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index e7d12fb..595698d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -50,6 +50,16 @@ Administration: yes: Allow no: "Don't allow" - staff and patrons to create and view saved lists of books. + - + - pref: DevUpdateControl + default: "PROD" + choices: + "PROD": "Only install official database revisions (PROD mode)" + "RESET": "After an official database revision, reinstall all development updates (RESET mode)" + "ALWAYS": "When upgrading, reinstall all development updates (ALWAYS mode)" + "TRACK": "Do not reinstall applied development updates (TRACK mode)" + - "from the atomicupdate folder of the installer.
" + - "NOTE: The PROD mode is (obviously) for production use, the other options are for developers. The list of recently installed development updates is saved in the local syspref _LocalAtomicUpdates (when using RESET or TRACK mode)." Login options: - - Automatically log out users after -- 1.7.7.6