walle-web
walle-web copied to clipboard
BUG admin.sh migration
问题描述 sh admin.sh migration 报错
问题描述
[root@localhost walle-web]# sh admin.sh migration
llllllllllllll
l::::l l::::l
wwwwwww wwwww wwwwww aaaaaaaaaaaaa l::::l l::::l eeeeeeeeeeee
w:::::w w:::::w w:::::w a::::::::::::a l::::l l::::l ee::::::::::::ee
w:::::w w:::::::w w:::::w aaaaaaaaa:::::a l::::l l::::l e::::::eeeee:::::ee
w:::::w w:::::::::w w:::::w a::::a l::::l l::::l e::::::e e:::::e
w:::::w w:::::w:::::w w:::::w aaaaaaa:::::a l::::l l::::l e:::::::eeeee::::::e
w:::::w w:::::w w:::::w w:::::w aa::::::::::::a l::::l l::::l e:::::::::::::::::e
w:::::w:::::w w:::::w:::::w a::::aaaa::::::a l::::l l::::l e::::::eeeeeeeeeee
w:::::::::w w:::::::::w a::::a a:::::a l::::l l::::l e:::::::e
w:::::::w w:::::::w a::::a a:::::a l::::l l::::l e::::::::e
w:::::w w:::::w a:::::aaaa::::::a l::::l l::::l e::::::::eeeeeeee
w:::w w:::w a::::::::::aa::a l::::: l:::::l ee:::::::::::::e
www www aaaaaaaaaa aaaa llllllllllllllll eeeeeeeeeeeeee
Migration walle
/opt/walle-web/walle/app.py:4: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['urllib3.util (/opt/walle-web/venv/lib/python3.6/site-packages/urllib3/util/init.py)', 'eventlet.green.ssl (/opt/walle-web/venv/lib/python3.6/site-packages/eventlet/green/ssl.py)', 'urllib3.util.ssl_ (/opt/walle-web/venv/lib/python3.6/site-packages/urllib3/util/ssl_.py)']. Subclasses (NOT patched): ["<class 'eventlet.green.ssl.GreenSSLContext'>"].
gevent.monkey.patch_all()
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 2bca06a823a0, init walle database
ERROR [alembic.env] (pymysql.err.InternalError) (1067, "Invalid default value for 'created_at'") [SQL: "CREATE TABLE environments
(\n id
int(10) NOT NULL AUTO_INCREMENT COMMENT '',\n name
varchar(100) DEFAULT 'master' COMMENT '',\n space_id
int(10) NOT NULL DEFAULT '0' COMMENT '',\n status
tinyint(1) DEFAULT '1' COMMENT '',\n created_at
datetime DEFAULT CURRENT_TIMESTAMP COMMENT '',\n updated_at
datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',\n PRIMARY KEY (id
)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='';"] (Background on this error at: http://sqlalche.me/e/2j85)
Traceback (most recent call last):
File "/opt/walle-web/venv/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
context)
File "/opt/walle-web/venv/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 509, in do_execute
cursor.execute(statement, parameters)
File "/opt/walle-web/venv/lib/python3.6/site-packages/pymysql/cursors.py", line 170, in execute
result = self._query(query)
File "/opt/walle-web/venv/lib/python3.6/site-packages/pymysql/cursors.py", line 328, in _query
conn.query(q)
File "/opt/walle-web/venv/lib/python3.6/site-packages/pymysql/connections.py", line 517, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/opt/walle-web/venv/lib/python3.6/site-packages/pymysql/connections.py", line 732, in _read_query_result
result.read()
File "/opt/walle-web/venv/lib/python3.6/site-packages/pymysql/connections.py", line 1075, in read
first_packet = self.connection._read_packet()
File "/opt/walle-web/venv/lib/python3.6/site-packages/pymysql/connections.py", line 684, in _read_packet
packet.check_error()
File "/opt/walle-web/venv/lib/python3.6/site-packages/pymysql/protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "/opt/walle-web/venv/lib/python3.6/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1067, "Invalid default value for 'created_at'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/walle-web/venv/bin/flask", line 8, in environments
(\n id
int(10) NOT NULL AUTO_INCREMENT COMMENT '',\n name
varchar(100) DEFAULT 'master' COMMENT '',\n space_id
int(10) NOT NULL DEFAULT '0' COMMENT '',\n status
tinyint(1) DEFAULT '1' COMMENT '',\n created_at
datetime DEFAULT CURRENT_TIMESTAMP COMMENT '',\n updated_at
datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',\n PRIMARY KEY (id
)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='';"] (Background on this error at: http://sqlalche.me/e/2j85)
Fatal Python error: PyImport_GetModuleDict: no module dictionary!
Thread 0x00007fa49ebb2700 (most recent call first): File "/opt/walle-web/venv/lib/python3.6/site-packages/gevent/_threading.py", line 84 in wait File "/opt/walle-web/venv/lib/python3.6/site-packages/gevent/_threading.py", line 166 in get File "/opt/walle-web/venv/lib/python3.6/site-packages/gevent/threadpool.py", line 270 in _worker
Current thread 0x00007fa4b2eff740 (most recent call first): File "/opt/walle-web/venv/lib/python3.6/site-packages/pymysql/connections.py", line 379 in _force_close admin.sh: 行 137: 11686 已放弃 flask db upgrade Migration: [ fail ] [root@localhost walle-web]#
logs/runtime.log
runtime...
logs/error.log
error...
截图 拖拽到此处即可上传
运行环境
- OS: [e.g. Centos 7.x]
- 版本 [e.g. aba77b36] walle首页信息处显示
MySQL 5.6.5以上,否则会在安装时报错