<commit_before>'''
SPDX-License-Identifier: Apache-2.0
Copyright 2020 <NAME> (<EMAIL>), Red Hat, Inc.
'''

import simplejson as json

from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, String, Integer, PickleType, Text


Base = declarative_base()


class JSONPickleType(PickleType):  # pylint: disable=abstract-method
    impl = Text


class VerfierMain(Base):
    __tablename__ = 'verifiermain'
    agent_id = Column(String(80),
                      primary_key=True)
    v = Column(String(45))
    ip = Column(String(15))
    port = Column(Integer)
    operational_state = Column(Integer)
    public_key = Column(String(500))
    tpm_policy = Column(String(1000))
    vtpm_policy = Column(String(1000))
    meta_data = Column(String(200))
    allowlist = Column(Text(429400000))
    ima_sign_verification_keys = Column(String(1048576))
    revocation_key = Column(String(2800))
    tpm_version = Column(Integer)
    accept_tpm_hash_algs = Column(JSONPickleType(pickler=json))
    accept_tpm_encryption_algs = Column(JSONPickleType(pickler=json))
    accept_tpm_signing_algs = Column(JSONPickleType(pickler=json))
    hash_alg = Column(String(10))
    enc_alg = Column(String(10))
    sign_alg = Column(String(10))
<commit_msg>SQLAlchemy database schema fix for the new `ima_sign_verification_keys` column<commit_after>'''
SPDX-License-Identifier: Apache-2.0
Copyright 2020 <NAME> (<EMAIL>), Red Hat, Inc.
'''

import simplejson as json

from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, String, Integer, PickleType, Text


Base = declarative_base()


class JSONPickleType(PickleType):  # pylint: disable=abstract-method
    impl = Text


class VerfierMain(Base):
    __tablename__ = 'verifiermain'
    agent_id = Column(String(80),
                      primary_key=True)
    v = Column(String(45))
    ip = Column(String(15))
    port = Column(Integer)
    operational_state = Column(Integer)
    public_key = Column(String(500))
    tpm_policy = Column(String(1000))
    vtpm_policy = Column(String(1000))
    meta_data = Column(String(200))
    allowlist = Column(Text(429400000))
    ima_sign_verification_keys = Column(Text(429400000))
    revocation_key = Column(String(2800))
    tpm_version = Column(Integer)
    accept_tpm_hash_algs = Column(JSONPickleType(pickler=json))
    accept_tpm_encryption_algs = Column(JSONPickleType(pickler=json))
    accept_tpm_signing_algs = Column(JSONPickleType(pickler=json))
    hash_alg = Column(String(10))
    enc_alg = Column(String(10))
    sign_alg = Column(String(10))

{'fraction_non_alphanumeric': 0.10867052023121387, 'fraction_numerical': 0.04084778420038536, 'mean_word_length': 4.680525164113786, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2941100', 'n_tokens_mistral': 951, 'n_tokens_neox': 853, 'n_words': 162}