Check out example codes for "set boolean flasksql". It will help you in understanding the concepts better.

Code Example 1

class User(db.Model):
    __tablename__ = 'users'
    id = db.Column(db.Integer, primary_key=True)
    can_view_records = db.Column(db.Boolean, default=False, nullable=False)

Learn ReactJs, React Native from akashmittal.com