Skip to content

Commit 429efbd

Browse files
Adds list of tables to check-db
1 parent afe2f03 commit 429efbd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

trapp/command_line.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ def checkDB(args):
3535
if (args.verbose):
3636
print(str(db.cursor))
3737
print('Warnings: ' + str(db.warnings()))
38+
print('')
39+
40+
# list database tables
41+
if (args.verbose):
42+
print('Tables:')
43+
tables = db.query('SHOW TABLES;', ())
44+
if tables.with_rows:
45+
records = tables.fetchall()
46+
for table in records:
47+
print(table)
3848

3949

4050
def compileGames():

0 commit comments

Comments
 (0)