Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)
Initialize the database or migrate if appropriate.

Returns information about whether or not we initialized
('inited'), migrated ('migrated'), or did nothing (None)

src/j/o/JoshuaGoblin-HEAD/mediagoblin/tests/test_sql_migrations.py   JoshuaGoblin(Download)
    assert migration_manager.database_current_migration == None
 
    result = migration_manager.init_or_migrate()
 
    # Make sure output was "inited"
        u'__main__', SET1_MODELS, FOUNDATIONS, SET1_MIGRATIONS, 
        Session(), printer)
    assert migration_manager.init_or_migrate() == None
 
    # Check version in database
 
    # Migrate
    result = migration_manager.init_or_migrate()
 
    # Make sure result was "migrated"

src/m/e/mediagoblin-0.6.1/mediagoblin/tests/test_sql_migrations.py   mediagoblin(Download)
    assert migration_manager.database_current_migration == None
 
    result = migration_manager.init_or_migrate()
 
    # Make sure output was "inited"
        u'__main__', SET1_MODELS, FOUNDATIONS, SET1_MIGRATIONS, 
        Session(), printer)
    assert migration_manager.init_or_migrate() == None
 
    # Check version in database
 
    # Migrate
    result = migration_manager.init_or_migrate()
 
    # Make sure result was "migrated"