数据模型
- id: 标识每条记录的字段,是表的主键,Integer 类型;
- title: 即任务清单的标题,String 类型;
- posted_on: 任务创建时间,DATE 类型;
- status: 任务的状态,Boolean 类型;
Creating directory /Users/admin/flask-todo/migrations ... done
Creating directory /Users/admin/flask-todo/migrations/versions ... done
Generating /Users/admin/flask-todo/migrations/env.py ... done
Generating /Users/admin/flask-todo/migrations/env.pyc ... done
Generating /Users/admin/flask-todo/migrations/README ... done
Please edit configuration/connection/logging settings in '/Users/admin/flask-
todo/migrations/alembic.ini' before proceeding.
$ python manage.py db migrate # 自动创建迁移脚本
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Generating /Users/admin/flask-todo/migrations/versions/70215a3905e0_.py ... done
$ python manage.py db upgrade # 更新数据库
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 70215a3905e0, empty message