def initialize_sql(engine, populate_db=True): DBSession.configure(bind=engine) Base.metadata.bind = engine Base.metadata.create_all(engine, checkfirst=True) # Bind the OpenID tables into the engine bind_engine(engine)
def initialize_sql(db_string='sqlite://', echo=False): engine = create_engine(db_string, echo=echo) DBSession.configure(bind=engine) bind_engine(engine)