我想将MySQL从5.7.29升级到8.0.19
我查询了 raw_tables = self.db.query(
"""
SELECT
t.table_schema,
t.table_name,
c.constraint_name,
c.constraint_type,
k.column_name,
k.ordinal_position
FROM
information_schema.tables t
LEFT JOIN
information_schema.table_constraints c on c.table_name=t.table_name AND c.table_schema=t.table_schema and (constraint_type='UNIQUE' or constraint_type='PRIMARY KEY')
LEFT JOIN
information_schema.key_column_usage k on k.constraint_name=c.constraint_name AND k.table_name=t.table_name and k.table_schema=t.table_schema
ORDER BY
t.table_schema,
t.table_name,
c.constraint_name,
k.ordinal_position,
k.column_name
"""
)
但是,我遇到了错误
ERROR: {
"column": {},
"foreign": false,
"include": true,
"is_id": false,
"reference": false,
"table": {}
} with key {} already filled with {
"column": {},
"foreign": false,
"include": true,
"is_id": false,
"reference": false,
"table": {}
}
此错误似乎是由于新MySQL版本的信息架构更改引起的