diff --git a/lib/scenic/adapters/postgres.rb b/lib/scenic/adapters/postgres.rb index ba1fb4e1..cc626a4d 100644 --- a/lib/scenic/adapters/postgres.rb +++ b/lib/scenic/adapters/postgres.rb @@ -214,7 +214,7 @@ def refresh_materialized_view(name, concurrently: false, cascade: false) refresh_dependencies_for(name, concurrently: concurrently) end - if concurrently + if concurrently && populated?(name) raise_unless_concurrent_refresh_supported execute "REFRESH MATERIALIZED VIEW CONCURRENTLY #{quote_table_name(name)};" else