def test_dont_add_column(self):
class SomeModel(pw.Model):
some_field = pw.CharField(null=True)
class Meta:
database = self.db
self.evolve_and_check_noop()
peeweedbevolve.clear()
class SomeModel(pw.Model):
some_field = pw.CharField(null=True)
some_other_field = pw.CharField(null=False)
class Meta:
database = self.db
evolve = False
self.evolve_and_check_noop()
# should not fail because the not-null column wasn't added
SomeModel.create(some_field='woot')
评论列表
文章目录