From 2f4cf46bcf58d73e20c0ecf25b20d8308cf62e9c Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sun, 19 May 2024 17:45:27 +0800 Subject: [PATCH] Update sphinx_make.py --- plugins/sphinx/class/sphinx_make.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sphinx/class/sphinx_make.py b/plugins/sphinx/class/sphinx_make.py index 1aa828895..36663a73d 100644 --- a/plugins/sphinx/class/sphinx_make.py +++ b/plugins/sphinx/class/sphinx_make.py @@ -217,7 +217,7 @@ def makeSqlToSphinxDb(pdb, db, table = []): # print(db_field_str) return conf -def makeSqlToSphinxTable(pdb,db,table,pk): +def makeSqlToSphinxTable(pdb,db,table,pkey_name): sql = "select COLUMN_NAME,DATA_TYPE from information_schema.COLUMNS where `TABLE_SCHEMA`='{}' and `TABLE_NAME` = '{}';" sql = sql.format(db,table,) @@ -233,7 +233,7 @@ def makeSqlToSphinxTable(pdb,db,table,pk): # if mw.inArray(['tinyint'], data_type): # conf += 'sql_attr_bool = '+ column_name + "\n" - if pk == column_name: + if pkey_name == column_name: run_pos += 1 if pkey_name == 'id': conf += '\tsql_attr_bigint = '+column_name+"\n"