-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PsqlDos
: Add entry_point_string
argument to drop_hashes
The `drop_hashes` function is a utility used by migrations to drop the hashes of nodes. This is used when the logic to compute the node hash is changed, and so existing hashes are no longer valid. The migration will drop all hashes and emit a warning, suggesting that the user run `verdi node rehash` to recompute the hashes. In certain migrations, however, only the hashes of certain node types may need to be dropped. Here the `entry_point_string` argument is added that allows to filter the target set of nodes. The entry point corresponding to the entry point is loaded, and from it the relevent `node_type` is computed. This is used to create a `WHERE` clause in the query. The warning is also made dynamic to include the correct option for `verdi node rehash` to only recompute the hash for the target subset of nodes.
- Loading branch information
Showing
1 changed file
with
38 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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