python - django数据库初始化
阿神
阿神 2017-04-17 17:15:32
0
2
372

django使用makemigrations和migrate之后数据存在哪里?(我是说这个项目本身怎么记录了你是否同步过数据,我删了数据库和migration下面的文件)如何做能使该文件恢复之前的状态,就是和直接创建项目而没有使用migrate时一样?

阿神
阿神

闭关修行中......

reply all(2)
左手右手慢动作

This may be useful:

http://stackoverflow.com/questions/29253399/how-to-reset-migrations-in-django-1-7

PHPzhong

The relevant data configuration is in settings.py. Please refer to: https://docs.djangoproject.com/en/1.9/ref/settings/

makemigrations are sql statements that generate databases.

migrate to execute those statements. Please refer to: https://docs.djangoproject.com/en/1.9/topics/migrations/

To view specific changes, just check in the database.

Hope to adopt

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!