Skip to content

Commit 05cd4dd

Browse files
committed
修复创建表时的成功判断逻辑
1 parent 100cde4 commit 05cd4dd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

feapder/commands/create/create_table.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,9 @@ def create(self, table_name):
141141
unique=unique,
142142
)
143143
print(sql)
144-
145-
if self._db.execute(sql):
144+
result=self._db.execute(sql)
145+
# 建立表成功。受影响的行数为 0,因此返回0
146+
if result==0:
146147
print("\n%s 创建成功" % table_name)
147148
print("注意手动检查下字段类型,确保无误!!!")
148149
else:

0 commit comments

Comments
 (0)