[sql, sqlalchemy] 연결된 두 테이블 cascade 설정하기 - 2 (uselist 설정)
지난 글에서 문제점이 있었다. class Announcement(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) title = db.Column(db.String(50), nullable=False) content = db.Column(db.Text, nullable=True) class AnnouncementUrl(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) announcement_id = db.Column(db.Integer, db.ForeignKey('announcement.id', ondelete='CASCADE'), n..
2023. 8. 10.