<commit_before>from sqlalchemy import Column, DateTime, Integer, LargeBinary, String
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()

class Paste(Base):
    """Class to define the paste table

    paste
    -------------
    id           (PK) int
    hashid       string (hash of data)
    ip           string (will be of "ip address" type in pg)
    mac          string (will be of "mac address" type in pg)
    mime         string
    timestamp    datetime
    sunset       datetime
    data         blob
    """
    __tablename__ = 'paste'

    id = Column(Integer, primary_key=True)
    hashid = Column(String, nullable=False)
    ip = Column(String)
    mac = Column(String)
    timestamp = Column(DateTime, nullable=False)
    mime = Column(String, default='text/plain')
    sunset = Column(DateTime)
    data = Column(LargeBinary)<commit_msg>Constraints and default datetime<commit_after>from sqlalchemy import Column, DateTime, Integer, LargeBinary, String, UniqueConstraint
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.sql import func

Base = declarative_base()

class Paste(Base):
    """Class to define the paste table

    paste
    -------------
    id           (PK) int
    hashid       string (hash of data)
    ip           string (will be of "ip address" type in pg)
    mac          string (will be of "mac address" type in pg)
    mime         string
    timestamp    datetime
    sunset       datetime
    data         blob
    """
    __tablename__ = 'paste'

    id = Column(Integer, primary_key=True)
    hashid = Column(String, nullable=False)
    ip = Column(String)
    mac = Column(String)
    timestamp = Column(DateTime, default=func.now())
    mime = Column(String, default='text/plain')
    sunset = Column(DateTime)
    data = Column(LargeBinary)

    __table_args__ = (UniqueConstraint('hashid', name='unique_hash'),)
{'fraction_non_alphanumeric': 0.0967067433350758, 'fraction_numerical': 0.0, 'mean_word_length': 2.5977443609022557, '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': '4571617', 'n_tokens_mistral': 552, 'n_tokens_neox': 533, 'n_words': 172}