File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
tests/apps/migrations/auto/integration Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1212from piccolo .conf .apps import AppConfig
1313from piccolo .columns .column_types import (
1414 BigInt ,
15+ Boolean ,
1516 Date ,
1617 Integer ,
1718 Interval ,
@@ -64,6 +65,10 @@ def timedelta_default():
6465 return datetime .timedelta (days = 1 )
6566
6667
68+ def boolean_default ():
69+ return True
70+
71+
6772@postgres_only
6873class TestMigrations (TestCase ):
6974 def tearDown (self ):
@@ -288,3 +293,19 @@ def test_interval_column(self):
288293 ]
289294 ]
290295 )
296+
297+ def test_boolean_column (self ):
298+ self ._test_migrations (
299+ table_classes = [
300+ self .table (column )
301+ for column in [
302+ Boolean (),
303+ Boolean (default = True ),
304+ Boolean (default = boolean_default ),
305+ Boolean (null = True , default = None ),
306+ Boolean (null = False ),
307+ Boolean (index = True ),
308+ Boolean (index = False ),
309+ ]
310+ ]
311+ )
You can’t perform that action at this time.
0 commit comments