sqlalchemy one column of two has to be not null
snippet in sql

sqlalchemy one column of two has to be not null

user7699

class BudgetCategories(Base):
    __tablename__ = 'budget_categories'
    # ...

    # @note: new
    __table_args__ = (
            CheckConstraint('NOT(category IS NULL AND parent_category IS NULL)'),
            )