Koha-clms/t/db_dependent
Jonathan Druart d0d628c611 Bug 17234: Need to separate KEY and FOREIGN KEY checks
In the previous patch we use the constraint_exists subroutine to verify
if an index or a foreign key exists.
But the `SHOW INDEX` query does not return foreign keys (as its name
suggests!).
We need another subroutine foreign_key_exists to check the FK existence.

I have found that because t/db_dependent/TestBuilder.t fails on
oai_sets_biblios, because oai_sets_biblios_ibfk_1 has not been removed.

Test plan:
0/ Do not apply this patch
1/ Use a 3.20 DB
2/ update the DB
3/ SHOW CREATE TABLE oai_sets_biblios
will display oai_sets_biblios_ibfk_1

Apply the patch and repeat 1, 2, 3
=> Will not display oai_sets_biblios_ibfk_1
It has been removed as expected.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 05fdd855c8)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit ba45608b0d)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2017-01-19 16:36:53 +01:00
..
Acquisition Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
Biblio Bug 15572: Add tests for TransformHtmlToMarc 2016-01-25 12:23:16 +01:00
Circulation Bug 14598: (followup) Remove unused and non-existent C4::ItemType include 2016-11-30 13:48:06 +01:00
Creators Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
Exporter Bug 17088: Add tests to cover the changes 2016-10-24 11:44:24 +02:00
Holds Bug 14878: (QA followup) Remove useless diag 2015-11-06 15:51:52 -03:00
Items Bug 13074: (followup) remove useless diag 2016-07-01 08:34:21 +02:00
Koha Remove t/db_dependent/Koha/Objects.t 2016-01-28 09:50:13 +01:00
LDAP
…
Labels Bug 14468: (QA followup) remove useless diags 2015-10-27 10:38:15 -03:00
Letters Bug 13215: Fix GetLetterTemplates should return default templates if branchcode is not defined 2014-11-27 11:42:26 -03:00
Members Bug 16443: [QA Follow-up] Add two tests for get_fields 2016-06-16 10:31:38 +02:00
OAI Bug 13940 : (QA followup) Add test for ModOAISet 2015-04-09 11:56:53 -03:00
Record Bug 12404: Allow equal sign '=' in the TT directive 2015-04-27 10:43:23 -03:00
Reports Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Reserves Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
SIP Bug 15006: Centralize timeout logic and allow zero client timeout 2016-08-17 11:56:47 +02:00
Search Bug 17323: Column search_history.time cannot be null 2016-11-30 14:06:47 +01:00
Serials Bug 12178: Update serial status to "claimed" when exporting to CSV 2016-08-17 11:33:26 +02:00
Template/Plugin Bug 7380: Add tests for TT plugins 2015-05-19 10:10:31 -03:00
Utils Bug 17375: Search by dateofbirth - Add tests 2016-11-08 10:17:31 +01:00
XSLT_Handler Bug 13262 - Add parameters to XSLT Handler transform method 2015-02-05 15:24:29 -03:00
api/v1 Bug 13799: Rename t/.../v1/borrowers.t to t/.../v1/patrons.t 2015-11-04 13:47:33 -03:00
data Bug 12419: (QA followup) regression tests 2014-06-30 15:57:23 -03:00
www Bug 14158: www search tests - Cleanup at the end 2016-04-06 15:49:15 +02:00
00-strict.t
…
Accounts.t Bug 16390: Accounts.t does not need MPL 2016-05-16 10:55:16 +02:00
Acquisition.t Bug 16934: Add test for ModOrder 2016-08-17 13:47:30 +02:00
AdditionalField.t Bug 10855: Remove additional field values when subscription is removed 2015-10-02 15:10:31 -03:00
Amazon.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-23 07:51:29 +01:00
AudioAlerts.t Bug 11431: (QA followup) remove diags 2015-11-06 15:08:37 -03:00
Auth.t Bug 16492: Test that no_set_userenv will not set userenv if not exist yet 2016-06-16 11:12:36 +02:00
Auth_with_cas.t Change syspref case to make tests pass 2016-03-23 14:18:08 +01:00
Auth_with_ldap.t Bug 14144: Clean ups and refactors 2016-05-16 12:04:34 +02:00
AuthorisedValues.t Bug 10363: Use Koha::AuthorisedValue[s] in the admin page 2015-10-19 12:46:27 -03:00
AuthoritiesMarc.t Bug 10985: [UNIMARC] Fix authority summary 2015-04-22 11:54:36 -03:00
BackgroundJob.t Bug 17426: Do not set AutoCommit in tests 2016-10-24 12:47:01 +02:00
Barcodes.t Bug 15878 - Updated unit tests for hbyymmincr barcodes 2016-05-25 11:05:57 +02:00
Barcodes_ValueBuilder.t Bug 15081: (QA followup) Fix issue with Barcodes_ValueBuilder.t 2015-11-04 12:32:57 -03:00
Biblio.t Bug 10961: (followup) Make query fields explicit and add regression tests 2015-07-28 10:19:51 -03:00
Bookseller.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-23 07:51:29 +01:00
Borrower.t Bug 14778: Make 3 tests pass 2015-10-23 12:01:17 -03:00
Borrower_Debarments.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
Borrower_Discharge.t Bug 17426: Do not set AutoCommit in tests 2016-10-24 12:47:01 +02:00
Borrower_Files.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
Borrowers.t Bug 10459: Add tests for borrowers.updated_on 2016-07-01 08:13:24 +02:00
Branch.t Bug 15628: Remove get_branchinfos_of vestiges 2016-02-04 22:29:05 +01:00
Breeding.t Bug 12898: (regression test) test terms inside double quotes 2014-09-14 02:02:51 -03:00
Budgets.t Bug 15009: QA follow-up 2016-05-16 14:01:43 +02:00
Category.t Bug 15081: (followup) Make test files using TestBuilder handle their transactions 2015-11-04 12:32:57 -03:00
Charset.t Bug 8218 : Add a maintenance script to sanitize biblio records 2014-11-11 15:38:36 -03:00
Circulation.t Bug 14598: [QA Follow-up] Small changes 2016-11-30 13:51:09 +01:00
Circulation_Branch.t Bug 16216: Circulation_Branch.t doesn't set itemtype for test data 2016-06-09 10:02:32 +02:00
Circulation_Issuingrule.t Bug 15757: Make GetLoanLength defaults to 0 instead of 21 2016-04-22 13:42:00 +02:00
Circulation_OfflineOperation.t
…
Circulation_dateexpiry.t Bug 15081: (followup) Make test files using TestBuilder handle their transactions 2015-11-04 12:32:57 -03:00
Circulation_issue.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-23 07:51:29 +01:00
Circulation_issuingrules.t Bug 15757: Make GetLoanLength defaults to 0 instead of 21 2016-04-22 13:42:00 +02:00
Circulation_transfers.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
ClassSource.t Bug 16860: Remove the comment about the warning 2016-08-16 17:30:44 +02:00
ColumnsSettings.t Bug 10212: Columns configuration for tables - Unit tests 2014-08-26 09:28:18 -03:00
Context.t Bug 16813: Allow empty string for OPACBaseURL 2016-08-17 12:45:46 +02:00
Contract.t Bug 14693: Contract.t should generate dates based on current date 2015-08-21 10:43:38 -03:00
CourseReserves.t Bug 15530 - Add Unit Test 2016-01-27 15:33:25 +01:00
Csv.t
…
Fines.t Bug 13590: Add ability to charge fines at start of charge period 2015-10-22 14:51:24 -03:00
FrameworkPlugin.t Bug 10480: New module and unit test for framework plugins 2015-04-16 14:48:35 -03:00
Heading_MARC21.t
…
Hold.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-23 07:51:29 +01:00
Holds.t Bug 16717: Improve variable naming 2016-07-01 09:04:43 +02:00
HoldsQueue.t Bug 11998: Make HoldsQueue.t tests pass [TO REVERT] 2016-03-23 07:55:35 +01:00
Holidays.t Bug 16376: (regression tests) 2017-01-02 11:50:49 +01:00
ILSDI_Services.t Bug 11944: use CGI( -utf8 ) everywhere 2015-01-13 13:07:21 -03:00
ImportBatch.t Bug 6520: Add unit test for C4::ImportBatch::GetRecordFromImportBiblio 2015-04-16 13:40:59 -03:00
Installer.t Bug 17234: Need to separate KEY and FOREIGN KEY checks 2017-01-19 16:36:53 +01:00
Items.t Bug 14598: Fix warning from effective_itemtype 2016-11-30 13:48:07 +01:00
Items_DelItem.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
KitchenSinkPlugin.kpz
…
Koha.t Bug 15337: Add tests to ensure that GetItemTypes will return element ordered by desc 2016-01-25 13:17:38 +01:00
Koha_Authority.t Bug 15578: Insert authority records before processing tests 2016-02-17 19:50:46 +01:00
Koha_Database.t Bug 13645: Cache the DBIx connection 2015-02-20 14:37:08 -03:00
Koha_Misc_Files.t Bug 3050: QA follow-up 2014-05-25 21:15:03 +00:00
Koha_borrower_modifications.t Bug 17494: (QA followup) Fix exception name 2016-12-19 11:35:58 +01:00
Koha_template_plugin_Branches.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
Koha_template_plugin_KohaDates.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-23 07:51:29 +01:00
Languages.t Bug 16866: Catch warning t/db_dependent/Languages.t 2016-08-17 10:43:16 +02:00
Letters.t Bug 17441: [QA Follow-up] Return value of SendAlerts 2016-10-24 12:28:07 +02:00
Linker_FirstMatch.t
…
Log.t Bug 15939: Action logs - Do not default dates to today 2016-03-07 11:35:14 +01:00
MarcModificationTemplates.t Bug 11413: Fix field_numbers 2014-11-14 12:05:47 -03:00
Members.t Bug 16426: Add tests for ModMember - do not update userid 2016-05-09 10:34:24 +02:00
Members_Attributes.t Bug 16504: Add regression tests 2016-06-16 09:52:08 +02:00
Members_columns.t
…
MungeMarcPrice.t
…
NewsChannels.t Bug 16550: Clean the tests 2016-05-25 11:27:25 +02:00
Overdues.t Bug 9180: All branches should be returned if a default rule exists 2014-08-19 09:29:51 -03:00
PatronLists.t Bug 16452: Remove the warnings raised by PatronLists.t 2016-05-16 13:47:16 +02:00
Plugins.t Bug 16502: Replace a few other ok-calls by is-calls 2016-07-01 08:37:37 +02:00
QueryParser.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-23 07:51:29 +01:00
Ratings.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
Record.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-23 07:51:29 +01:00
RecordProcessor_EmbedSeeFromHeadings.t Bug 14456: (regression test) Holdings fields should be skipped by EmbedSeeFromHeadings 2015-07-24 13:39:53 -03:00
Reports.t
…
ReportsGuided.t Bug 14778: Use mock_dbh where it should be used 2015-10-23 12:01:18 -03:00
Reports_Guided.t Bug 16224: Fix t/db_dependent/Reports_Guided.t 2016-04-21 10:14:57 +02:00
Reserves.t Bug 14968 - Provides unit test 2016-08-16 16:10:07 +02:00
Review.t Bug 15199: t/db_dependent/Review.t should not depend on existing data 2015-11-17 23:45:25 -03:00
RotatingCollections.t Bug 8836: (RM followup) unit tests should use the new API 2014-11-07 11:09:14 -03:00
SIPILS.t Bug 15947: move SIPILS.t to DB-dependent test directory 2016-03-07 11:36:58 +01:00
SIP_ILS.t Bug 7904: (QA followup) fix tests 2015-02-05 15:50:32 -03:00
Search.t Bug 17278: Fix test compilation errors 2016-12-19 12:53:21 +01:00
Serials.t Bug 12178: Fix tests not to depend on dateformat syspref 2016-08-17 11:50:22 +02:00
Serials_2.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
Service.t
…
ShelfBrowser.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
Sitemapper.t Bug 16751: What is sitemaper? 2016-08-16 15:14:43 +02:00
Stats.t Bug 11230 - Refactor C4::Stats::UpdateStats and add UT 2014-07-27 11:29:28 -03:00
SuggestionEngine_ExplodedTerms.t Bug 16869: Silence and catch warnings in t/db_dependent/SuggestionEngine_ExplodedTerms.t 2016-08-16 17:02:24 +02:00
Suggestions.t Bug 16325: Add a test for SearchSuggestions when searching for STATUS='' 2016-05-16 13:24:13 +02:00
Tags.t Bug 12916 - Missing Test to demonstrate warnings. 2014-10-30 00:31:26 -03:00
Templates.t Bug 5338: (QA followup) update the tests for the new reports 2015-05-19 13:54:09 -03:00
TestBuilder.t Bug 15159: TestBuilder behaviour on AI values should be tested 2015-11-17 10:39:52 -03:00
Upload.t Bug 16501: Remove some unneeded warns in Upload.t 2016-05-17 07:59:20 +02:00
UsageStats.t Bug 14097: Fixed missing test cases 2016-03-07 14:22:13 +01:00
Virtualshelves.t Bug 14544: [QA Follow-up] Added some test descriptions 2015-11-05 10:00:31 -03:00
XISBN.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-23 07:51:29 +01:00
XSLT_Handler.t Bug 13262: (QA followup) fix duplicate variable definition 2015-02-05 15:25:50 -03:00
check_sysprefs.t Bug 14383: Fix some typos in comments and documentation 2015-06-22 17:34:46 -03:00
db_structure.t Fix number of tests for db_structure.t 2016-08-25 10:30:28 +02:00
default_search_class.pl Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-23 07:51:29 +01:00
rollingloans.t Bug 13315 - Add feedback for last item checked out to circulation.pl 2015-04-13 14:52:26 -03:00
sysprefs.t Bug 11998: Use Koha::Cache to cache sysprefs 2016-03-23 07:41:27 +01:00
zebra_config.pl Bug 15082: t/db_dependent/Search.t shouldn't mock the DB connection 2015-10-29 14:10:23 -03:00