<commit_before>from .. import BaseModel, db


class Role(BaseModel):
    __tablename__ = "role"

    id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
    name = db.Column(db.String(255))
    can_triage_requests = db.Column(db.Boolean())
    can_edit_settings = db.Column(db.Boolean())
    can_create_users = db.Column(db.Boolean())
    can_create_groups = db.Column(db.Boolean())
    can_edit_roles = db.Column(db.Boolean())
    can_manage_infrastructure = db.Column(db.Boolean())
    can_upload_data = db.Column(db.Boolean())

    def __str__(self):
        return (
            f"<Role id: {self.id}, name: {self.name}, "
            f"can_triage_requests: {self.can_triage_requests}, "
            f"can_edit_settings: {self.can_edit_settings}, "
            f"can_create_users: {self.can_create_users}, "
            f"can_create_groups: {self.can_create_groups}, "
            f"can_edit_roles: {self.can_edit_roles}, "
            f"can_manage_infrastructure: {self.can_manage_infrastructure}>, "
            f"can_upload_data: {self.can_upload_data}>"
        )<commit_msg>Set a default value to role columns<commit_after>from .. import BaseModel, db


class Role(BaseModel):
    __tablename__ = "role"

    id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
    name = db.Column(db.String(255))
    can_triage_requests = db.Column(db.Boolean(), default=False)
    can_edit_settings = db.Column(db.Boolean(), default=False)
    can_create_users = db.Column(db.Boolean(), default=False)
    can_create_groups = db.Column(db.Boolean(), default=False)
    can_edit_roles = db.Column(db.Boolean(), default=False)
    can_manage_infrastructure = db.Column(db.Boolean(), default=False)
    can_upload_data = db.Column(db.Boolean(), default=False)

    def __str__(self):
        return (
            f"<Role id: {self.id}, name: {self.name}, "
            f"can_triage_requests: {self.can_triage_requests}, "
            f"can_edit_settings: {self.can_edit_settings}, "
            f"can_create_users: {self.can_create_users}, "
            f"can_create_groups: {self.can_create_groups}, "
            f"can_edit_roles: {self.can_edit_roles}, "
            f"can_manage_infrastructure: {self.can_manage_infrastructure}>, "
            f"can_upload_data: {self.can_upload_data}>"
        )
{'fraction_non_alphanumeric': 0.13258717176065432, 'fraction_numerical': 0.002582866982350409, 'mean_word_length': 3.3849056603773584, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3826785', 'n_tokens_mistral': 791, 'n_tokens_neox': 773, 'n_words': 113}