added several uniqueness constraints
This commit is contained in:
parent
0cd7d1280e
commit
9bbb646c51
@ -29,7 +29,7 @@ class Genre(Base):
|
|||||||
__tablename__ = 'Genre'
|
__tablename__ = 'Genre'
|
||||||
|
|
||||||
ID: Mapped[int] = mapped_column(primary_key=True)
|
ID: Mapped[int] = mapped_column(primary_key=True)
|
||||||
Genre: Mapped[str]
|
Genre: Mapped[str] = mapped_column(unique=True)
|
||||||
|
|
||||||
texte: Mapped[List['Text_Genre']] = relationship(back_populates='genre')
|
texte: Mapped[List['Text_Genre']] = relationship(back_populates='genre')
|
||||||
werke: Mapped[List['Werk_Genre']] = relationship(back_populates='genre')
|
werke: Mapped[List['Werk_Genre']] = relationship(back_populates='genre')
|
||||||
@ -39,7 +39,7 @@ class Herausgeber(Base):
|
|||||||
__tablename__ = 'Herausgeber'
|
__tablename__ = 'Herausgeber'
|
||||||
|
|
||||||
ID: Mapped[int] = mapped_column(primary_key=True)
|
ID: Mapped[int] = mapped_column(primary_key=True)
|
||||||
Name: Mapped[str]
|
Name: Mapped[str] = mapped_column(unique=True)
|
||||||
|
|
||||||
werke: Mapped[List['Werk_Herausgeber']] = relationship(back_populates='herausgeber')
|
werke: Mapped[List['Werk_Herausgeber']] = relationship(back_populates='herausgeber')
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ class Pseudonym(Base):
|
|||||||
__tablename__ = 'Pseudonym'
|
__tablename__ = 'Pseudonym'
|
||||||
|
|
||||||
ID: Mapped[int] = mapped_column(primary_key=True)
|
ID: Mapped[int] = mapped_column(primary_key=True)
|
||||||
Pseudonym: Mapped[str]
|
Pseudonym: Mapped[str] = mapped_column(unique=True)
|
||||||
|
|
||||||
veroeffentlichung: Mapped[List['Veroeffentlichung']] = relationship(back_populates='pseudonym')
|
veroeffentlichung: Mapped[List['Veroeffentlichung']] = relationship(back_populates='pseudonym')
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class Sprache(Base):
|
|||||||
__tablename__ = 'Sprache'
|
__tablename__ = 'Sprache'
|
||||||
|
|
||||||
ID: Mapped[int] = mapped_column(primary_key=True)
|
ID: Mapped[int] = mapped_column(primary_key=True)
|
||||||
Sprache: Mapped[str]
|
Sprache: Mapped[str] = mapped_column(unique=True)
|
||||||
|
|
||||||
text: Mapped[List['Text']] = relationship(back_populates='sprache')
|
text: Mapped[List['Text']] = relationship(back_populates='sprache')
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class Textform(Base):
|
|||||||
__tablename__ = 'Textform'
|
__tablename__ = 'Textform'
|
||||||
|
|
||||||
ID: Mapped[int] = mapped_column(primary_key=True)
|
ID: Mapped[int] = mapped_column(primary_key=True)
|
||||||
Textform: Mapped[str]
|
Textform: Mapped[str] = mapped_column(unique=True)
|
||||||
|
|
||||||
text: Mapped[List['Text']] = relationship(back_populates='textform')
|
text: Mapped[List['Text']] = relationship(back_populates='textform')
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ class Verlag(Base):
|
|||||||
__tablename__ = 'Verlag'
|
__tablename__ = 'Verlag'
|
||||||
|
|
||||||
ID: Mapped[int] = mapped_column(primary_key=True)
|
ID: Mapped[int] = mapped_column(primary_key=True)
|
||||||
Verlag: Mapped[str]
|
Verlag: Mapped[str] = mapped_column(unique=True)
|
||||||
|
|
||||||
reihe: Mapped[List['Reihe']] = relationship(back_populates='verlag')
|
reihe: Mapped[List['Reihe']] = relationship(back_populates='verlag')
|
||||||
werk: Mapped[List['Werk']] = relationship(back_populates='verlag')
|
werk: Mapped[List['Werk']] = relationship(back_populates='verlag')
|
||||||
@ -107,7 +107,7 @@ class Werksform(Base):
|
|||||||
__tablename__ = 'Werksform'
|
__tablename__ = 'Werksform'
|
||||||
|
|
||||||
ID: Mapped[int] = mapped_column(primary_key=True)
|
ID: Mapped[int] = mapped_column(primary_key=True)
|
||||||
Werksform: Mapped[str]
|
Werksform: Mapped[str] = mapped_column(unique=True)
|
||||||
|
|
||||||
werk: Mapped[List['Werk']] = relationship(back_populates='werksform')
|
werk: Mapped[List['Werk']] = relationship(back_populates='werksform')
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user