Answer the question
In order to leave comments, you need to log in
How to ensure data uniqueness in SQLAlchemy?
There is a table:
PostVoice(db.Model):
id = db.Column(db.Integer, primary_key=True)
user_id = db.Column(db.Integer, db.ForeignKey('user.id'),nullable=False)
blogpost_id = db.Column(db.Integer, db.ForeignKey('blog_post.id'),nullable=False)
value = db.Column(db.Enum(VoiceEnum),nullable=False)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question