Answers for "sqlalchemy one column of two has to be not null"

SQL
0

sqlalchemy one column of two has to be not null

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

    # @note: new
    __table_args__ = (
            CheckConstraint('NOT(category IS NULL AND parent_category IS NULL)'),
            )
Posted by: Guest on December-03-2020

Code answers related to "sqlalchemy one column of two has to be not null"

Code answers related to "SQL"

Browse Popular Code Answers by Language