From dc25a106ffcb512de629cabd1ee285d8f75a1289 Mon Sep 17 00:00:00 2001 From: Emily Waters <31249687+ew318@users.noreply.github.com> Date: Tue, 29 Nov 2022 10:06:26 +0000 Subject: [PATCH] Update table_builder.py Apply fix specified in https://github.com/kvesteri/sqlalchemy-continuum/issues/285#issuecomment-1229426028 --- sqlalchemy_continuum/table_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlalchemy_continuum/table_builder.py b/sqlalchemy_continuum/table_builder.py index 600d1e02..75e582cb 100644 --- a/sqlalchemy_continuum/table_builder.py +++ b/sqlalchemy_continuum/table_builder.py @@ -29,7 +29,7 @@ def reflect_column(self, column): if column_copy.name == self.option('transaction_column_name'): column_copy.nullable = False - if not column_copy.primary_key: + if not column_copy.primary_key and column_copy.nullable: column_copy.nullable = True # Find the right column key