From 66243f1945cd85bd66076b89626ec3d5f61f7e21 Mon Sep 17 00:00:00 2001 From: Richard Kooijman Date: Tue, 29 Nov 2022 10:55:07 +0100 Subject: [PATCH] remove the forced nullability of PK's --- target_snowflake/db_sync.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/target_snowflake/db_sync.py b/target_snowflake/db_sync.py index ffac46c5..aa542137 100644 --- a/target_snowflake/db_sync.py +++ b/target_snowflake/db_sync.py @@ -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]: