From 04e7fc258ba6606f8be11fd42e176444fa4f41b9 Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Tue, 16 Nov 2021 19:01:46 -0500 Subject: [PATCH] sql.table.Column: set nullable to false on default --- izzylib/sql/table.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/izzylib/sql/table.py b/izzylib/sql/table.py index d7c5e5a..fda4cc2 100644 --- a/izzylib/sql/table.py +++ b/izzylib/sql/table.py @@ -34,6 +34,9 @@ class Column(sqlalchemy_column): except KeyError: raise KeyError(f'Invalid SQL data type: {type}') + if kwargs.get('default'): + kwargs['nullable'] = False + options = [name, type] if fkey: