diff --git a/plugins/postgres/dbt/include/postgres/macros/relations/materialized_view/drop.sql b/plugins/postgres/dbt/include/postgres/macros/relations/materialized_view/drop.sql new file mode 100644 index 00000000000..2263bb652b2 --- /dev/null +++ b/plugins/postgres/dbt/include/postgres/macros/relations/materialized_view/drop.sql @@ -0,0 +1,3 @@ +{% macro postgres__drop_materialized_view(relation) -%} + drop materialized view if exists {{ relation }} cascade +{%- endmacro %} diff --git a/plugins/postgres/dbt/include/postgres/macros/relations/table/drop.sql b/plugins/postgres/dbt/include/postgres/macros/relations/table/drop.sql new file mode 100644 index 00000000000..146cfc8273f --- /dev/null +++ b/plugins/postgres/dbt/include/postgres/macros/relations/table/drop.sql @@ -0,0 +1,3 @@ +{% macro postgres__drop_table(relation) -%} + drop table if exists {{ relation }} cascade +{%- endmacro %} diff --git a/plugins/postgres/dbt/include/postgres/macros/relations/view/drop.sql b/plugins/postgres/dbt/include/postgres/macros/relations/view/drop.sql new file mode 100644 index 00000000000..46bd5a063eb --- /dev/null +++ b/plugins/postgres/dbt/include/postgres/macros/relations/view/drop.sql @@ -0,0 +1,3 @@ +{% macro postgres__drop_view(relation) -%} + drop view if exists {{ relation }} cascade +{%- endmacro %}