기본 콘텐츠로 건너뛰기

flask -- 기존 db table 변경하기

flask -- 기존 db table 변경하기

flask -- 기존 db table 변경하기

환경 ; python 3.6

참고 ; https://github.com/miguelgrinberg/Flask-Migrate

https://flask-migrate.readthedocs.io/en/latest/

문제점 ; flask-sqlalchemy 사용하여 처음에 db table 생성하면, 추후에 column 을 추가하는 작업을 할수 없다.

해결책 ; flask-migrate 사용하면 됨.

Then each time the database models change repeat the migrate and upgrade commands.

from http://freeprog.tistory.com/357 by ccl(A) rewrite - 2020-03-07 11:20:51

댓글