Fix: Avoid unnecessary view recreation for metadata changes during migration#5597
Fix: Avoid unnecessary view recreation for metadata changes during migration#5597xardasos wants to merge 10 commits intoSQLMesh:mainfrom
Conversation
…d only and virtual env mode flags
|
Hi @izeigerman, @erindru and @eakmanrq, I'd appreciate your review of this PR. The changes aim to prevent unnecessary view (especially MV) recreation when deploying Note: For engines that support comments in post-creation commands (like I'm open to any suggestions you may have. Thanks for your time! |
|
Hi @tobymao, I noticed that the PR was closed and I just wanted to ask if there's something I could adjust. I realize now that I should have also mentioned earlier in the PR description that one of my goals is to address a bug that causes data to be unavailable in production for a long time and makes rollback difficult. I've created a related issue (#5653). I'd be happy to update or resubmit if this PR change is useful. Thanks for maintaining this project. |
This PR optimizes views migration. In the case of metadata changes, it is not always necessary to recreate views if the engine doesn't support view comments. This optimization is especially relevant for materialized views, which can take more time to be rebuilt.