Comments (6)
回滚数据库,重新升级,升级过程中不要中断。(因为进行数据表结构迁移是一个完整的操作,不能断开)。
from jumpserver.
试过回滚数据库,重新升级,结果还是一样的哦,过程没有中断过
from jumpserver.
Traceback (most recent call last):
File "/opt/py3/lib/python3.11/site-packages/django/db/backends/utils.py", line 87 , in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/db/backends/mysql/base.py", li ne 75, in execute
return self.cursor.execute(query, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/MySQLdb/cursors.py", line 179, in exe cute
res = self._query(mogrified_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/MySQLdb/cursors.py", line 330, in _qu ery
db.query(q)
File "/opt/py3/lib/python3.11/site-packages/MySQLdb/connections.py", line 255, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (1050, "Table 'assets_custom' already exists")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/jumpserver/./jms", line 88, in perform_db_migrate
management.call_command('migrate')
File "/opt/py3/lib/python3.11/site-packages/django/core/management/init.py", line 198, in call_command
return command.execute(*args, **defaults)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/core/management/base.py", line 448, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/core/management/base.py", line 96, in wrapped
res = handle_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/core/management/commands/migra te.py", line 349, in handle
post_migrate_state = executor.migrate(
^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/db/migrations/executor.py", li ne 135, in migrate
state = self._migrate_all_forwards(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/db/migrations/executor.py", li ne 167, in _migrate_all_forwards
state = self.apply_migration(
^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/db/migrations/executor.py", li ne 252, in apply_migration
state = migration.apply(state, schema_editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/db/migrations/migration.py", l ine 130, in apply
operation.database_forwards(
File "/opt/py3/lib/python3.11/site-packages/django/db/migrations/operations/model s.py", line 96, in database_forwards
schema_editor.create_model(model)
File "/opt/py3/lib/python3.11/site-packages/django/db/backends/base/schema.py", l ine 447, in create_model
self.execute(sql, params or None)
File "/opt/py3/lib/python3.11/site-packages/django/db/backends/base/schema.py", l ine 199, in execute
cursor.execute(sql, params)
File "/opt/py3/lib/python3.11/site-packages/django/db/backends/utils.py", line 67 , in execute
return self._execute_with_wrappers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/db/backends/utils.py", line 80 , in _execute_with_wrappers
return executor(sql, params, many, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/db/backends/utils.py", line 84 , in _execute
with self.db.wrap_database_errors:
File "/opt/py3/lib/python3.11/site-packages/django/db/utils.py", line 91, in ex it
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/py3/lib/python3.11/site-packages/django/db/backends/utils.py", line 87 , in _execute
return self.cursor.execute(sql)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/django/db/backends/mysql/base.py", li ne 75, in execute
return self.cursor.execute(query, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/MySQLdb/cursors.py", line 179, in exe cute
res = self._query(mogrified_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/py3/lib/python3.11/site-packages/MySQLdb/cursors.py", line 330, in _qu ery
db.query(q)
File "/opt/py3/lib/python3.11/site-packages/MySQLdb/connections.py", line 255, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (1050, "Table 'assets_custom' already exists")
这个步骤是我再一次尝试的结果
from jumpserver.
我看和第一次执行的报错不一样了。
多尝试几次,创建数据库时编码要保持一致。
from jumpserver.
抱歉忘记说了,最开始是报错Table 'assets_custom' already exists",然后我手动把这个表删除了,接着就有了第一个报错(3780, "Referencing column 'asset_ptr_id' and referenced column 'id' in foreign key constraint 'assets_custom_asset_ptr_id_c9ab0d9d_fk_assets_asset_id' are incompatible."),现在无论怎么尝试都是这两个报错
from jumpserver.
看下这个回复。主要是字符集问题。
from jumpserver.
Related Issues (20)
- 使用guacamole盘下载目录出错 HOT 4
- [Bug] Bug 标题 3.10.7版本 鼠标指针不变化形状 HOT 4
- [Bug] Bug 3.10.7登录页面 1天内自动登录无法勾选 HOT 1
- [Bug] v3.10.7新版本消息通知邮件配置异常错误 HOT 7
- [Bug] 使用本地客户端连接Redis,magnus组件有报错,修改key值保存后刷新再看实际没改成功。 HOT 4
- [Bug] 使用标签筛选主机资源,当一个标签名有两个值时,筛选全部无法展示资源 HOT 3
- [Question] 使用哪个Dockerfile构建JMS_ALL镜像? HOT 2
- [Bug] 用户筛选功能异常 HOT 1
- [Feature] 资产树可以设置自定义展示层级 HOT 1
- [Feature] 建议在资产列表上方添加一个上下页切换 HOT 1
- [Question] JumpserverV3.7.1 利用模版创建的用户 推送不到资产上 提示skipping: no hosts matched HOT 8
- [Bug] Bug 标题 3.10.7版本经常提示“账号已退出,请重新登录” HOT 1
- [Question]命令过滤‘rm’在web终端生效,但是我用xshell登录进去 还是可以用rm命令 HOT 14
- [Bug] 标签筛选主机,只能单个标签,两个及以上标签无法筛选 HOT 2
- [Question] 该如何贡献并支持多语言?(以中文繁体为例)(v3) HOT 8
- 1panel更新最新版本后,无法使用WEB SSH HOT 1
- [Bug] 远程发布机删除后,还一直发布离线报警 HOT 2
- [Bug] 非管理员用户访问数据库失败提示1045 - backend auth error auth failed HOT 2
- [Question] Where is the code that sets up networking HOT 14
- [Feature] 文件传输的权限控制 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jumpserver.