add experience_links table

This commit is contained in:
Giovanni committed 2026-10-07 22:01:41 +02:00
1 parent 11bfc9e387
commit 13982ac495
3 files changed
+46

No files matched your search

@@ -0,0 +1,39 @@
from sqlalchemy import (
Column,
Integer,
String,
ForeignKey
)
from sqlalchemy.orm import relationship
from app.database import Base
class ExperienceLinks(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"
)