Skip to content

Commit 85990e7

Browse files
Adds list of tables to check-db
1 parent 4a5b023 commit 85990e7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

trapp/command_line.py

+10
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ def checkDB(args):
3434
if (args.verbose):
3535
print(str(db.cursor))
3636
print('Warnings: ' + str(db.warnings()))
37+
print('')
38+
39+
# list database tables
40+
if (args.verbose):
41+
print('Tables:')
42+
tables = db.query('SHOW TABLES;', ())
43+
if tables.with_rows:
44+
records = tables.fetchall()
45+
for table in records:
46+
print(table)
3747

3848

3949
def compileGames():

0 commit comments

Comments
 (0)