Files
liquibase-maven01/cleanup.views/changelog-dir/cleanup_all_views/01_cleanup-allviews.sql
T

11 lines
462 B
SQL
Raw Normal View History

2024-06-17 23:07:48 +00:00
do $$ declare
r record;
begin
2024-06-17 23:26:16 +00:00
for r in (select table_name from information_schema.tables where table_type = 'VIEW' and table_schema = 'public' and table_name != 'pg_stat_statements' and table_name != 'pg_stat_statements_info') loop
execute 'drop view if exists public.' || quote_ident(r.table_name) || ' cascade';
2024-06-17 23:07:48 +00:00
end loop;
2024-06-17 23:26:16 +00:00
end $$;
DROP TABLE IF EXISTS liquibase.datachangelog_views;
DROP TABLE IF EXISTS liquibase.datachangeloglock_views;