Create tables only when ensure_schema=True. Fixes #330.
This commit is contained in:
parent
2637254bcf
commit
17fffe78c2
@ -228,6 +228,8 @@ class Database(object):
|
||||
# you can also use the short-hand syntax:
|
||||
table = db['population']
|
||||
"""
|
||||
if not self.ensure_schema:
|
||||
return self.load_table(table_name)
|
||||
return self.create_table(table_name, primary_id, primary_type)
|
||||
|
||||
def __getitem__(self, table_name):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user