Merge pull request #62 from gmbrax/fix/model-entry-nullable-fields

fix the entry model to not allow the title nor the date to be null
This commit is contained in:
Gustavo Henrique Miranda 2025-07-20 17:53:27 -03:00 committed by GitHub
commit 4dda85d8a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -11,9 +11,9 @@ from pilgrim.database import Base
class Entry(Base):
__tablename__ = "entries"
id = Column(Integer, primary_key=True)
title = Column(String)
title = Column(String,nullable=False)
text = Column(String)
date = Column(DateTime)
date = Column(DateTime,nullable=False)
photos = relationship(
"Photo",
secondary=photo_entry_association,