You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[16:23:34] INFO [16:23:34] - INFO - Logger set up with log logger.py:31
level: 10(DEBUG)
INFO: Started server process [9]
INFO: Waiting for application startup.
Creating database and tables
DEBUG [16:23:34] - DEBUG - Creating database and tables base.py:15
INFO: Started server process [8]
INFO: Waiting for application startup.
Creating database and tables
DEBUG [16:23:34] - DEBUG - Creating database and tables base.py:15
Error creating database and tables: (pymysql.err.OperationalError) (1050, "Table 'flow' already exists")
[SQL:
CREATE TABLE flow (
update_time DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
data JSON,
name VARCHAR(255) NOT NULL,
user_id INTEGER,
description VARCHAR(255),
logo VARCHAR(255),
status INTEGER,
create_time DATETIME,
id CHAR(32) NOT NULL,
PRIMARY KEY (id),
UNIQUE (id)
)
]
(Background on this error at: https://sqlalche.me/e/14/e3q8)
ERROR [16:23:34] - ERROR - Error creating database and base.py:19
tables: (pymysql.err.OperationalError) (1050,
"Table 'flow' already exists")
[SQL:
CREATE TABLE flow (
update_time DATETIME NOT NULL DEFAULT
CURRENT_TIMESTAMP,
data JSON,
name VARCHAR(255) NOT NULL,
user_id INTEGER,
description VARCHAR(255),
logo VARCHAR(255),
status INTEGER,
create_time DATETIME,
id CHAR(32) NOT NULL,
PRIMARY KEY (id),
UNIQUE (id)
)
]
(Background on this error at:
https://sqlalche.me/e/14/e3q8)
ERROR: Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1900, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 736, in do_execute
cursor.execute(statement, parameters)
File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 163, in execute
result = self._query(query)
File "/usr/local/lib/python3.10/site-packages/pymysql/cursors.py", line 321, in _query
conn.query(q)
File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 505, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 724, in _read_query_result
result.read()
File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 1069, in read
first_packet = self.connection._read_packet()
File "/usr/local/lib/python3.10/site-packages/pymysql/connections.py", line 676, in _read_packet
packet.raise_for_error()
File "/usr/local/lib/python3.10/site-packages/pymysql/protocol.py", line 223, in raise_for_error
err.raise_mysql_exception(self._data)
File "/usr/local/lib/python3.10/site-packages/pymysql/err.py", line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1050, "Table 'flow' already exists")
环境:Ubuntu 20.04
版本:v0.1.3-4-g28276a7
在重启backend的docker容器时,容器能正常启动,但是检查日志,报错如下:
mysql容器中已有bisheng的数据库,也有flow这张表,从报错来看,似乎是初始化应用的时候重新创建了表导致冲突
The text was updated successfully, but these errors were encountered: