Repository navigation
Create the tables on activation only when they are missing - #26
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
postActivation()ranConfig/TheliaMain.sqlwhenever theis_initializedvalue of the module configuration was missing. The script starts withDROP TABLE, so on a database that has the tables but not the flag (a test database built bybin/test-prepare, a database restored withoutmodule_config, a lost configuration), deactivating and reactivating the module deleted every highlight.The hook now asks the database instead: the script runs only when the
header_highlightstable does not exist. The flag is no longer read or written. CustomFrontMenu 2.0.0 does the same.update()no longer sets the flag on the way to 1.0.1, since nothing reads it any more.#23 also moves the module to 2.1.4: whichever is merged second needs 2.1.5.
Tests/Integration/ActivationTest.phpwrites a row, removes the flag, activates the module and checks the row is still there; it fails without the fix. A second test drops the tables of the module and checks that activation creates them all again. Reactivating the module from the command line on a demo shop without the flag kept its highlights.The module is bumped to 2.1.4.