web sttarting
This commit is contained in:
@@ -10,7 +10,7 @@ class Response(Base):
|
||||
__tablename__ = "responses"
|
||||
|
||||
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
poll_id = Column(UUID(as_uuid=True), ForeignKey("polls.id"), nullable=False)
|
||||
poll_id = Column(UUID(as_uuid=True), ForeignKey("polls.id", ondelete="CASCADE"), nullable=False)
|
||||
user_id = Column(UUID(as_uuid=True), nullable=True)
|
||||
submitted_at = Column(DateTime(timezone=True), server_default=func.now(), nullable=False)
|
||||
|
||||
@@ -22,7 +22,7 @@ class Answer(Base):
|
||||
|
||||
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
||||
response_id = Column(UUID(as_uuid=True), ForeignKey("responses.id", ondelete="CASCADE"), nullable=False)
|
||||
question_id = Column(UUID(as_uuid=True), ForeignKey("questions.id"), nullable=False)
|
||||
question_id = Column(UUID(as_uuid=True), ForeignKey("questions.id", ondelete="CASCADE"), nullable=False)
|
||||
choice_id = Column(UUID(as_uuid=True), nullable=True)
|
||||
text = Column(Text, nullable=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user