Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

forced nullability was switched of for PK's #380

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions target_snowflake/db_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,10 +854,6 @@ def _refresh_table_pks(self):

queries.append(f'alter table {table_name} add primary key({pk_list});')

# For now, we don't wish to enforce non-nullability on the pk columns
for pk in current_pks.union(new_pks):
queries.append(f'alter table {table_name} alter column {safe_column_name(pk)} drop not null;')

self.query(queries)

def _get_current_pks(self) -> Set[str]:
Expand Down