tripal / t4d8

This is a temporary repository for Drupal 9 upgrade for Tripal v4. It is meant to house issues related to the upgrade.
GNU General Public License v2.0
1 stars 10 forks source link

Fix for issue #218 #219

Closed spficklin closed 2 years ago

spficklin commented 2 years ago

This PR provides a fix for issue #218. It just checks to see if a prefix has already been applied to a table and if so does not allow it to be applied again by removing the curly braces from around the table name.

This should prevent the problem that occurs in when running an update and the prefixTables function is called twice leading to two prefixes being added.

I'm not sure how to suggest testing this. There are no functional tests for updates of the TripalDBX and I'm writing some for the IDSpace and Vocabulary classes and that's how I found this problem but those tests are on another branch.

spficklin commented 2 years ago

I should add. That when I put these fixes into my branch tv4g1-129-TripalFields-spf I am able to complete the tests... no problem.

spficklin commented 2 years ago

Yeah, from this point forward we should be writing lots of code that will fully stress test the Tripal DBX so any other problems should work themselves out if this code misses something.

laceysanderson commented 2 years ago

Merged! 🎉 Nice fix!