]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/xxxx.data.support_matomo.sql
LP1517298: Matomo Support with library org settings
[Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / xxxx.data.support_matomo.sql
1        BEGIN;
2
3        SELECT evergreen.upgrade_deps_block_check('xxxx', :eg_version);
4
5        INSERT into config.org_unit_setting_type
6        ( name, grp, label, description, datatype, fm_class ) VALUES
7       ( 'opac.analytics.matomo_id', 'opac',
8           oils_i18n_gettext('opac.analytics.matomo_id',
9                'Requires the Matomo ID',
10                'coust', 'label'),
11           oils_i18n_gettext('opac.analytics.matomo_id',
12                'Requires the Matomo ID',
13                'coust', 'description'),
14           'string', NULL),
15       ( 'opac.analytics.matomo_url', 'opac',
16           oils_i18n_gettext('opac.analytics.matomo_url',
17                'Requires the url to the Matomo software',
18                'coust', 'label'),
19           oils_i18n_gettext('opac.analytics.matomo_url',
20                'Requires the url to the Matomo software',
21                'coust', 'description'),
22           'string', NULL)
23       ;
24
25       INSERT INTO permission.perm_list ( id, code, description ) VALUES
26       ( 623, 'UPDATE_ORG_UNIT_SETTING.opac.analytics.use_matomo', oils_i18n_gettext(623,
27          'Set OPAC to use Matomo tracking', 'ppl', 'description')),
28       ;
29
30       UPDATE config.org_unit_setting_type SET update_perm = 623 WHERE name = 'opac.analytics.matomo_id';            
31       UPDATE config.org_unit_setting_type SET update_perm = 623 WHERE name = 'opac.analytics.matomo_url';
32
33       COMMIT;
34