sqlalchemy one column of two has to be not null

Solutions on MaxInterview for sqlalchemy one column of two has to be not null by the best coders in the world

showing results for - "sqlalchemy one column of two has to be not null"
Esteban
24 Jan 2018
1class BudgetCategories(Base):
2    __tablename__ = 'budget_categories'
3    # ...
4
5    # @note: new
6    __table_args__ = (
7            CheckConstraint('NOT(category IS NULL AND parent_category IS NULL)'),
8            )
9
similar questions