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

All Samples(14)  |  Call(8)  |  Derive(0)  |  Import(6)

src/p/t/ptah-0.8.0/ptah/scripts/migrate.py   ptah(Download)
import ptah.migrate
from ptah import scripts
from ptah.populate import create_db_schema
from ptah.migrate import upgrade, revision
from ptah.migrate import MigrationContext, MIGRATION_ID
    if args.cmd == 'upgrade':
        # create db schemas
        create_db_schema(env['registry'], False)
 
        for pkg in args.package:

src/p/t/ptah-HEAD/ptah/scripts/migrate.py   ptah(Download)
import ptah.migrate
from ptah import scripts
from ptah.populate import create_db_schema
from ptah.migrate import upgrade, revision
from ptah.migrate import MigrationContext, MIGRATION_ID
    if args.cmd == 'upgrade':
        # create db schemas
        create_db_schema(env['registry'], False)
 
        for pkg in args.package:

src/p/t/ptah-0.8.0/ptah/tests/test_populate.py   ptah(Download)
    def test_event(self):
        from ptah.populate import create_db_schema
 
        data = [False]
        def event_handler(ev):
            event_handler, (ptah.events.BeforeCreateDbSchema,))
 
        create_db_schema(self.registry)
        self.assertTrue(data[0])
 
    def test_skip_tables(self):
        from ptah.populate import create_db_schema
        cfg['db_skip_tables'] = ('test_populate_TestTable',)
 
        create_db_schema(self.registry)
 
        self.assertFalse(
            base.metadata.tables['test_populate_TestTable'].exists())
 
        cfg['db_skip_tables'] = ()
        create_db_schema(self.registry)

src/p/t/ptah-HEAD/ptah/tests/test_populate.py   ptah(Download)
    def test_event(self):
        from ptah.populate import create_db_schema
 
        data = [False]
        def event_handler(ev):
            event_handler, (ptah.events.BeforeCreateDbSchema,))
 
        create_db_schema(self.registry)
        self.assertTrue(data[0])
 
    def test_skip_tables(self):
        from ptah.populate import create_db_schema
        cfg['db_skip_tables'] = ('test_populate_TestTable',)
 
        create_db_schema(self.registry)
 
        self.assertFalse(
            base.metadata.tables['test_populate_TestTable'].exists())
 
        cfg['db_skip_tables'] = ()
        create_db_schema(self.registry)