Beispiel #1
0
def init_db(db_url):
    db_url = URL(db_url)
    DB, migrator = DB_ENGINES.get(
        db_url.scheme,
        lambda x: log.fatal("Unable to fund database driver"))(db_url)

    DB.create_tables([Migrations], safe=True)
    migrate_db(DB, Migrations, migrator)
Beispiel #2
0
def init_db(db_url):
    db_url = URL(db_url)
    DB, migrator = DB_ENGINES.get(
        db_url.scheme,
        lambda x: log.fatal("Unable to fund database driver")
    )(db_url)

    DB.create_tables([Migrations], safe=True)
    migrate_db(DB, Migrations, migrator)