add experience_links table

This commit is contained in:
Giovanni committed 2026-10-07 22:07:56 +02:00
1 parent f7be853cd8
commit c32b667e68
1 file changed
@@ -0,0 +1,39 @@
from sqlalchemy import (
Column,
Integer,
String,
ForeignKey
)
from sqlalchemy.orm import relationship
from app.database import Base
class ExperienceLink(Base):
__tablename__ = "experience_links"
id = Column(
Integer,
primary_key=True,
index=True
)
link = Column(
String(255),
nullable=False
)
experience_id = Column(
Integer,
ForeignKey(
"experiences.id",
ondelete="CASCADE"
),
nullable=False
)
experience = relationship(
"Experience",
back_populates="links"
)