Add question_id column

This commit is contained in:
rsakeys 2020-04-07 19:37:31 +01:00
parent 71158dcb97
commit a8f03c1180

View File

@ -106,6 +106,7 @@ class RedemptionBook(db.Model):
class RedemptionBookWord(db.Model):
__tablename__ = 'redemption_book_word'
question_id = db.Column(db.Integer, primary_key=True, server_default=db.text("nextval('\"redemption_book_word_question_id_seq\"'::regclass)"))
book_id = db.Column(db.ForeignKey('redemption_book.id', ondelete='CASCADE', onupdate='CASCADE'), primary_key=True,
nullable=False)
page = db.Column(db.SmallInteger, primary_key=True, nullable=False, server_default=db.text("1"))