Bug 32030: ERM - Add vendor to license
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 28 Jul 2022 08:30:55 +0000 (10:30 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 8 Nov 2022 12:44:19 +0000 (09:44 -0300)
commitfccf6acc043b0dd95b992762bdc8182a4d6eae74
tree3bcc95c8b2d7bc194775a468bc8c543886a556e9
parent646a1ede2beb8905ac134b56f7c50693e4d00c6c
Bug 32030: ERM - Add vendor to license

ALTER TABLE erm_agreement_licenses DROP FOREIGN KEY erm_licenses_ibfk_1;
ALTER TABLE erm_agreement_licenses DROP FOREIGN KEY erm_licenses_ibfk_2;
ALTER TABLE erm_agreement_licenses ADD CONSTRAINT `erm_agreement_licenses_ibfk_1` FOREIGN KEY (`agreement_id`) REFERENCES `erm_agreements` (`agreement_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE erm_agreement_licenses ADD CONSTRAINT `erm_agreement_licenses_ibfk_2` FOREIGN KEY (`license_id`) REFERENCES `erm_licenses` (`license_id`) ON DELETE CASCADE ON UPDATE CASCADE;

ALTER TABLE erm_licenses ADD COLUMN vendor_id INT(11) DEFAULT NULL AFTER license_id;
ALTER TABLE erm_licenses ADD CONSTRAINT `erm_licenses_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
13 files changed:
Koha/ERM/Agreement.pm
Koha/ERM/License.pm
api/v1/swagger/definitions/erm_agreement.yaml
api/v1/swagger/definitions/erm_license.yaml
api/v1/swagger/paths/erm_licenses.yaml
installer/data/mysql/atomicupdate/erm.pl
installer/data/mysql/kohastructure.sql
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsShow.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesShow.vue
koha-tmpl/intranet-tmpl/prog/js/vue/fetch.js