e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

`db_verify::getIndex()`: Support `index_col_name` optional parts #5055

Closed Deltik closed 10 months ago

Deltik commented 11 months ago

Motivation and Context

Fixes: https://github.com/e107inc/e107/issues/5054

Description

Update the regex in db_verify::getIndex() to support the optional parts of index_col_name

How Has This Been Tested?

Automated test method: db_verifyTest::testGetIndexOptionalLengthAndSortOrder()

Types of Changes

Checklist

CaMer0n commented 10 months ago

Thank you for this @Deltik ! Would you also like to add a test for it in db_VerifyTest::testGetIndex() before I merge the pull-request?

Deltik commented 10 months ago

Yep, I'll add a test now, @CaMer0n

Deltik commented 10 months ago

Test added, and actually fixed another matching bug when the optional length was omitted: https://github.com/e107inc/e107/compare/ceddd798f04da034735ea340fbf8f733733bb378..b623868756e99b65c0c9f03d09b0f45dad6ef4a4#diff-940e04ed023a2601964002f97da3727414c057256735fc831fbd1fa1aab7703bL1068

codeclimate[bot] commented 10 months ago

Code Climate has analyzed commit b6238687 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 34.5% (0.0% change).

View more on Code Climate.

CaMer0n commented 10 months ago

Thank you!! 👍