diff --git a/oml/db.py b/oml/db.py index 0a45b98..0f09ac4 100644 --- a/oml/db.py +++ b/oml/db.py @@ -80,8 +80,11 @@ class MutableDict(Mutable, dict): self.changed() def run_sql(sql): + if isinstance(sql, str): + sql = [sql] with session() as s: - s.connection().execute(sql) + for q in sql: + s.connection().execute(q) s.commit() def table_exists(table):