client/securedrop_client/db.py [202:220]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    __table_args__ = (
        UniqueConstraint("source_id", "file_counter", name="uq_messages_source_id_file_counter"),
    )

    id = Column(Integer, primary_key=True)
    uuid = Column(String(36), unique=True, nullable=False)
    filename = Column(String(255), nullable=False)
    file_counter = Column(Integer, nullable=False)
    size = Column(Integer, nullable=False)
    download_url = Column(String(255), nullable=False)

    # This is whether the submission has been downloaded in the local database.
    is_downloaded = Column(Boolean(name="is_downloaded"), nullable=False, server_default=text("0"))

    # This tracks if the file had been successfully decrypted after download.
    is_decrypted = Column(
        Boolean(name="is_decrypted"),
        CheckConstraint(
            "CASE WHEN is_downloaded = 0 THEN is_decrypted IS NULL ELSE 1 END",
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



client/securedrop_client/db.py [319:338]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    __table_args__ = (
        UniqueConstraint("source_id", "file_counter", name="uq_messages_source_id_file_counter"),
    )

    id = Column(Integer, primary_key=True)
    uuid = Column(String(36), unique=True, nullable=False)
    filename = Column(String(255), nullable=False)

    file_counter = Column(Integer, nullable=False)
    size = Column(Integer, nullable=False)
    download_url = Column(String(255), nullable=False)

    # This is whether the submission has been downloaded in the local database.
    is_downloaded = Column(Boolean(name="is_downloaded"), nullable=False, server_default=text("0"))

    # This tracks if the file had been successfully decrypted after download.
    is_decrypted = Column(
        Boolean(name="is_decrypted"),
        CheckConstraint(
            "CASE WHEN is_downloaded = 0 THEN is_decrypted IS NULL ELSE 1 END",
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



