Closed zzjackaa closed 4 years ago
[root@master Ops-master]# python manage.py makemigrations users assets dbmanager fort plan projs task wiki You are trying to add the field 'add_time' with 'auto_now_add=True' to userplan without a default; the database needs something to populate existing rows.
1) Provide a one-off default now (will be set on all existing rows) 2) Quit, and let me add a default in models.py Select an option: 2 [root@master Ops-master]# python manage.py migrate Operations to perform: Apply all migrations: admin, auth, contenttypes, django_celery_beat, django_celery_results, sessions, users 貌似是并没有加载想要的app 我尝试通过只迁移一个app但是 apply中永远就只有 admin, auth, contenttypes, django_celery_beat, django_celery_results, sessions, users这些
把库删了重建吧,然后把users目录下migrations里的内容删除,只保留init.py,然后再执行python manage.py makemigrations users assets dbmanager fort plan projs task wiki
感谢大佬 起来了 但是进入界面发现一个template模板 缺少 docker_list的value
In template /data/Ops-master/templates/base.html, error at line 225
起来了,这个html没有写完我就注释了.再次感谢大佬
大佬 ,登陆界面后显示 Table 'ops.ops_assets' doesn't exist表缺失 但是我在数据库中并未发现此表 +-------------------------------------+ | Tables_in_ops | +-------------------------------------+ | auth_group | | auth_group_permissions | | auth_permission | | django_admin_log | | django_celery_beat_crontabschedule | | django_celery_beat_intervalschedule | | django_celery_beat_periodictask | | django_celery_beat_periodictasks | | django_celery_beat_solarschedule | | django_celery_results_taskresult | | django_content_type | | django_migrations | | django_session | | ops_user | | ops_user_groups | | ops_user_plan | | ops_user_user_permissions | | ops_users_log | +-------------------------------------+ 能不能麻烦提供下改表结构