Skip to content

Commit

Permalink
One more migration fix (#298)
Browse files Browse the repository at this point in the history
 Don't recreate reporting views before MV migration
  • Loading branch information
joshelser authored Sep 13, 2023
1 parent c6bc328 commit 8087dad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bootstrap/019_query_history_updates.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ language sql
as
begin
SYSTEM$LOG_TRACE('Migrating query history data.');
-- Update the internal_reporting views to reflect any updates from snowflake's views.
call internal.migrate_view();
-- Update _only_ the internal_reporting views to reflect any updates from snowflake's views.
call INTERNAL.create_view_QUERY_HISTORY_COMPLETE_AND_DAILY();
let migrate1 string := '';
call internal.migrate_if_necessary('INTERNAL_REPORTING', 'QUERY_HISTORY_COMPLETE_AND_DAILY', 'INTERNAL_REPORTING_MV', 'QUERY_HISTORY_COMPLETE_AND_DAILY') into :migrate1;
let migrate2 string := '';
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/090_post_setup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ CREATE OR REPLACE TASK TASKS.SFUSER_MAINTENANCE
AS
CALL INTERNAL.refresh_users();

-- enable the query_hash column in the query_history view
-- create the query_hash functions in TOOLS
call INTERNAL.ENABLE_QUERY_HASH();

-- Populate the list of predefined labels
Expand Down

0 comments on commit 8087dad

Please sign in to comment.