本文介绍了运行manage.py migration,但在graphite.db中没有创建与accout相关的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Ubuntu Server 16.04 LTS上安装石墨0.9.15.在配置步骤中

I'm installing graphite 0.9.15 on Ubuntu Server 16.04 LTS.During configuration step

然后使用官方安装说明中的命令:

Then using the command in the official installation instruction:

提供信息

然后我去检查了graphite.db

Then I went to check the graphite.db

仅创建了两个表django_migrations和sqlite_sequence,没有与帐户相关的表.在apache错误日志中,/opt/graphite/storage/log/webapp/error.log,OperationalError:没有这样的表:auth_user.这是因为缺少这些帐户表.

Only two tables created, django_migrations and sqlite_sequence, no account relevant tables. And inside apache error log, /opt/graphite/storage/log/webapp/error.log, OperationalError: no such talbe: auth_user. It's because of missing those account tables.

一些信息:ubuntu 16.04 LTS
python2.7.11
django 1.9.6
django-tagging 0.4.3
耳语,碳,石墨0.9.15

Some info:ubuntu 16.04 LTS
python2.7.11
django 1.9.6
django-tagging 0.4.3
whisper, carbon, graphite 0.9.15

请问谁知道原因以及如何解决?非常感谢!

Please who know the reason and how to solve this? Thanks a lot!

推荐答案

实际上,我的问题是,每次运行"sudo python manage.py migration"时,每次只创建部分表,并且几个表名以account_,dashboard_,事件,总是想念.
终于找到了原因,不要使用我在官方文档中提到的命令.它不适用于Django 1.9及更高版本.石墨官方文件已经很长时间没有更新了.

Actually my issue is that when I run "sudo python manage.py migrate" each time only partial tables are created and several tables name starts with account_, dashboard_, events, always miss.
Finally found the reason, don't use that command I used and which mentioned in official doc. It does not work on Django 1.9 and above. And graphite official document have not been updated for long time ....

您需要的是

这篇关于运行manage.py migration,但在graphite.db中没有创建与accout相关的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 20:24