<commit_before>"""SQLAlchemy models for questions and quest completions."""

import backend

db = backend.db

QUESTION_TYPES = ('upload', 'text')


class Answer(db.Model):
    """An answer to a question.  Answers are submitted by learners and
    evaluated by mentors.
    """
    id = db.Column(db.Integer, primary_key=True, nullable=False)

    question_type = db.Column(
            db.Enum(*QUESTION_TYPES, name='question_types'), nullable=False)
    answer_text = db.Column(db.String, nullable=True)<commit_msg>set nice table name for answers<commit_after>"""SQLAlchemy models for questions and quest completions."""

import backend

db = backend.db

QUESTION_TYPES = ('upload', 'text')


class Answer(db.Model):
    """An answer to a question.  Answers are submitted by learners and
    evaluated by mentors.
    """
    __tablename__ = 'answers'

    id = db.Column(db.Integer, primary_key=True, nullable=False)

    question_type = db.Column(
            db.Enum(*QUESTION_TYPES, name='question_types'), nullable=False)
    answer_text = db.Column(db.String, nullable=True)
{'fraction_non_alphanumeric': 0.11748381128584644, 'fraction_numerical': 0.0, 'mean_word_length': 4.0092592592592595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4214537', 'n_tokens_mistral': 346, 'n_tokens_neox': 334, 'n_words': 90}