작성
·
370
0
안녕하세요. ipython에서 실습 중 에러가 발생합니다.
먼저, application.py는 다음과 같이 작성하였습니다.
그리고 아래는 ipython에서 실습한 내용입니다.
In [1]: from application import db
c:\jieun\inflearn\venv\lib\site-packages\flask_sqlalchemy\__init__.py:872: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning.
warnings.warn(FSADeprecationWarning(
In [2]: from application import Role, Member, Project
In [3]: admin = Role(position = 'admin')
c:\jieun\inflearn\venv\lib\site-packages\sqlalchemy\orm\relationships.py:3441: SAWarning: relationship 'Member.project' will copy column member.id to column member_project.member_id, which conflicts with relationship(s): 'Project.member' (copies member.id to member_project.member_id), 'Member.projects' (copies member.id to member_project.member_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The
'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
util.warn(
c:\jieun\inflearn\venv\lib\site-packages\sqlalchemy\orm\relationships.py:3441: SAWarning: relationship 'Member.project' will copy column project.id to column member_project.porject_id, which conflicts with relationship(s): 'Project.member' (copies project.id to member_project.porject_id), 'Member.projects' (copies project.id to member_project.porject_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.
The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
util.warn(
c:\jieun\inflearn\venv\lib\site-packages\sqlalchemy\orm\relationships.py:3441: SAWarning: relationship 'Project.members' will copy column project.id to column member_project.porject_id, which conflicts with relationship(s): 'Project.member' (copies project.id to member_project.porject_id), 'Member.projects' (copies project.id to member_project.porject_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
util.warn(
c:\jieun\inflearn\venv\lib\site-packages\sqlalchemy\orm\relationships.py:3441: SAWarning: relationship 'Project.members' will copy column member.id to column member_project.member_id, which conflicts with relationship(s): 'Project.member' (copies member.id to member_project.member_id), 'Member.projects' (copies member.id to member_project.member_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
util.warn(
db.create_all()로 form.db 파일은 생성된 상황입니다.
보시고 도움 부탁드립니다~!
답변 3
0
0
0