Skip to content

Commit

Permalink
Drop only PK/UK/FK when PostgreSQL tuncates
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dflippo committed Jun 21, 2022
1 parent 65929c1 commit 96c7068
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions macros/postgres__create_constraints.sql
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
from information_schema.table_constraints
where table_schema = '{{relation.schema}}'
and table_name='{{relation.identifier}}'
and constraint_type in ('FOREIGN KEY', 'PRIMARY KEY', 'UNIQUE')
{%- endset -%}
{%- set constraint_list = run_query(lookup_query) -%}

Expand Down

0 comments on commit 96c7068

Please sign in to comment.