Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace internal uses of unsafe_execute with raw_execute (#103)
We've always used the migration's code wrapper around `connection.execute` internally to our custom migration methods so that we can get query logging for free. That made sense when we only had two levels of "safety" here: 1. `safe_*` methods with safety checks 2. `unsafe_*` methods dispatching to the original But we've realized that there are some basic safety features that properly fit into even the `unsafe_*` methods, because, for example, those are generally used to indicate the DDL may not be safe for the application (say, dropping a table), but even if a DDL operation is unsafe for the application we ought still to avoid systems-level impact like long-held locks. In support of that we changed the taxonomy of methods in e3c9bd6 to make `raw_*` methods the way to always directly dispatch to the original method while `unsafe_*` can have basic levels of safety. In light of that change we should use the direct dispatch method aliases when we're implementing our own DDL, because it's expect that such calls will be appropriately wrapped internally with the right kind of safety (e.g., locking). Co-authored-by: Lisa Cicatello <[email protected]>
- Loading branch information