Skip to content

Latest commit

 

History

History
48 lines (23 loc) · 968 Bytes

File metadata and controls

48 lines (23 loc) · 968 Bytes

EOMS

experimental


开发环境

    python 3.6
    django 2.0.5 
    PyMySQL 0.9.2
    django-redis 4.9.0

运行环境

    nginx + gunicorn + django + mysql + redis

生成表

    python manage.py makemigrations
    python manage.py migrate

额外操作

    python manage.py makemigrations --empty 应用名
    python manage.py migrate --fake  # 如果有删除表或更改表名时先执行这一句

导出表数据

    python manage.py dumpdata cmdb > cmdb_dump.json

导入表数据

    python manage.py loaddata cmdb_dump.json

查看创建表sql

    python manage.py sqlmigrate cmdb 0001