질문, 답변 모델 생성하기 p55, Run하면 error가 나타납니다. 무엇이 잘 못 된것인지 도움을 부탁드립니다. 진도를 더 나갈수가 없어서요~

from pybo import db

class Question(db.Model):
id = db.Column(db.Integer, primary_key=True)
question_id = db.Column(db.Integer,
db.ForeignKey('question.id', ondelete='CASCADE'))
question = db.relationship('Question', backref=db.backref('answer_set', ))
content = db.Column(db.TextTime(), nullable=False)
create_date = db.Column(db.DateTime(), nullable=False)
class Answer(db.Model):
id = db.Colum(db.Interger, primary_key=True)
question_id = db.Column(db.Integer,
db.Foreignkey('question.id', ondelete='CASCADE'))
question = db.relationship('Question', backref=db.backref('answer_set', ))
content = db.Column(db.Text(), nullable=False)
create_date = db.Column(db.DateTime(), nullable=False)

C:\venvs\myproject\Scripts\python.exe C:/projects/myproject/pybo/models.py
Traceback (most recent call last):
File "C:\projects\myproject\pybo\models.py", line 3, in
class Question(db.Model):
File "C:\projects\myproject\pybo\models.py", line 8, in Question
content = db.Column(db.TextTime(), nullable=False)
AttributeError: 'SQLAlchemy' object has no attribute 'TextTime'

Process finished with exit code 1

아~ 위의 철자가 잘 못된것을 확인하였습니다. 감사합니다.

Willees 342

M 2021년 3월 24일 5:31 오후

목록으로