sql.generic.SqlDatabase: raise an error when no tables specified
This commit is contained in:
parent
24ae540ea5
commit
56e3e30db1
|
@ -97,6 +97,9 @@ class SqlDatabase:
|
|||
|
||||
|
||||
def create_tables(self, *tables):
|
||||
if not tables:
|
||||
raise ValueError('No tables specified')
|
||||
|
||||
new_tables = [self.table[table] for table in tables]
|
||||
self.table.meta.create_all(bind=self.db, tables=new_tables)
|
||||
|
||||
|
|
Loading…
Reference in a new issue