def create_latest_db(): """Creates the database including the schema using SQLAlchemy's db.create_all method instead of going through all the database revisions. The revision will be set to 'head' which indicates the latest alembic revision. """ create_database(db.engine.url) db.create_all() alembic.stamp()
def create_latest_db(target="default@head"): """Creates the database including the schema using SQLAlchemy's db.create_all method instead of going through all the database revisions. The revision will be set to 'head' which indicates the latest alembic revision. :param target: The target branch. Defaults to 'default@head'. """ if not database_exists(db.engine.url): create_database(db.engine.url) db.create_all() alembic.stamp(target=target)