Altered the Cardinality of the foreign keys to be non-nullable

This commit is contained in:
Gustavo Henrique Santos Souza de Miranda
2025-06-05 22:01:54 -03:00
parent be1bce9261
commit 103b9a9da1
5 changed files with 21 additions and 10 deletions
+2 -2
View File
@@ -4,5 +4,5 @@ from ..database import Base
photo_entry_association = Table('photo_entry_association', Base.metadata,
Column('id', Integer, primary_key=True, autoincrement=True),
Column('fk_photo_id', Integer, ForeignKey('photos.id')),
Column('fk_entry_id', Integer, ForeignKey('entries.id')))
Column('fk_photo_id', Integer, ForeignKey('photos.id'),nullable=False),
Column('fk_entry_id', Integer, ForeignKey('entries.id'),nullable=False))