add comment

This commit is contained in:
Chico Venancio
2018-05-06 04:23:14 +00:00
parent 196b4ebc9f
commit c553f82580

View File

@@ -663,8 +663,9 @@ def new_session_factory(url="sqlite:///:memory:",
# check the db revision (will raise, pointing to `upgrade-db` if version doesn't match) # check the db revision (will raise, pointing to `upgrade-db` if version doesn't match)
check_db_revision(engine) check_db_revision(engine)
if mysql_large_prefix_check(engine):
add_row_format(Base) if mysql_large_prefix_check(engine): # if mysql is allows large indexes
add_row_format(Base) # set format on the tables
Base.metadata.create_all(engine) Base.metadata.create_all(engine)
# We set expire_on_commit=False, since we don't actually need # We set expire_on_commit=False, since we don't actually need