Ejemplo n.º 1
0
    def run(self, runtime):
        from spire.schema import Schema
        name = self['schema']
        interface = Schema.interface(name)

        if self['drop']:
            runtime.report('dropping schema %r' % name)
            interface.drop_schema()

        runtime.report('deploying schema %r to %r' % (name, interface.url))
        interface.deploy_schema()
Ejemplo n.º 2
0
Archivo: tasks.py Proyecto: esho/spire
    def run(self, runtime):
        from spire.schema import Schema
        name = self['schema']
        interface = Schema.interface(name)

        if self['drop']:
            runtime.report('dropping schema %r' % name)
            interface.drop_schema()

        runtime.report('deploying schema %r to %r' % (name, interface.url))
        interface.deploy_schema()
Ejemplo n.º 3
0
Archivo: tasks.py Proyecto: esho/spire
    def run(self, runtime):
        schemas = self['schemas']
        if schemas is None:
            schemas = []
            for token, conf in self.assembly.filter_configuration('schema').iteritems():
                schemas.append(conf['schema'])
        if not schemas:
            runtime.report('no schemas specified or configured; aborting')
            return

        from spire.schema import Schema
        for name in schemas:
            interface = Schema.interface(name)
            if not self['incremental']:
                interface.drop_schema()

            runtime.report('creating %r schema' % name)
            interface.create_schema()
Ejemplo n.º 4
0
    def run(self, runtime):
        schemas = self['schemas']
        if schemas is None:
            schemas = []
            for token, conf in self.assembly.filter_configuration(
                    'schema').iteritems():
                schemas.append(conf['schema'])
        if not schemas:
            runtime.report('no schemas specified or configured; aborting')
            return

        from spire.schema import Schema
        for name in schemas:
            interface = Schema.interface(name)
            if not self['incremental']:
                interface.drop_schema()

            runtime.report('creating %r schema' % name)
            interface.create_schema()
Ejemplo n.º 5
0
Archivo: env.py Proyecto: esho/platoon
from alembic import context
from spire.schema import Schema

interface = Schema.interface('platoon')

def run_migrations_offline():
    engine = interface.get_engine()
    connection = engine.connect()

    context.configure(connection=connection,
        compare_type=True,
        target_metadata=interface.schema.metadata,
        sqlalchemy_module_prefix=None)

    with context.begin_transaction():
        context.run_migrations()

def run_migrations_online():
    engine = interface.get_engine()
    connection = engine.connect()

    context.configure(connection=connection,
        compare_type=True,
        target_metadata=interface.schema.metadata,
        sqlalchemy_module_prefix=None)

    try:
        with context.begin_transaction():
            context.run_migrations()
    finally:
        connection.close()
Ejemplo n.º 6
0
from alembic import context
from spire.schema import Schema

interface = Schema.interface('docket')

def run_migrations_offline():
    context.configure(url=interface['url'])
    with context.begin_transaction():
        context.run_migrations()

def run_migrations_online():
    engine = interface.get_engine()
    connection = engine.connect()

    context.configure(connection=connection,
        compare_type=True,
        target_metadata=interface.schema.metadata,
        sqlalchemy_module_prefix=None)

    try:
        with context.begin_transaction():
            context.run_migrations()
    finally:
        connection.close()

if context.is_offline_mode():
    run_migrations_offline()
else:
    run_migrations_online()
Ejemplo n.º 7
0
Archivo: env.py Proyecto: siq/narrative
from alembic import context
from spire.schema import Schema

interface = Schema.interface('narrative')

def run_migrations_offline():
    context.configure(url=interface['url'])
    with context.begin_transaction():
        context.run_migrations()

def run_migrations_online():
    engine = interface.get_engine()
    connection = engine.connect()

    context.configure(connection=connection,
        compare_type=True,
        target_metadata=interface.schema.metadata,
        sqlalchemy_module_prefix=None)

    try:
        with context.begin_transaction():
            context.run_migrations()
    finally:
        connection.close()

if context.is_offline_mode():
    run_migrations_offline()
else:
    run_migrations_online()
Ejemplo n.º 8
0
from alembic import context
from spire.schema import Schema

interface = Schema.interface('platoon')


def run_migrations_offline():
    engine = interface.get_engine()
    connection = engine.connect()

    context.configure(connection=connection,
                      compare_type=True,
                      target_metadata=interface.schema.metadata,
                      sqlalchemy_module_prefix=None)

    with context.begin_transaction():
        context.run_migrations()


def run_migrations_online():
    engine = interface.get_engine()
    connection = engine.connect()

    context.configure(connection=connection,
                      compare_type=True,
                      target_metadata=interface.schema.metadata,
                      sqlalchemy_module_prefix=None)

    try:
        with context.begin_transaction():
            context.run_migrations()
Ejemplo n.º 9
0
Archivo: env.py Proyecto: esho/yabl
from alembic import context
from spire.schema import Schema

interface = Schema.interface('tap')

def run_migrations_offline():
    context.configure(url=interface['url'])
    with context.begin_transaction():
        context.run_migrations()

def run_migrations_online():
    engine = interface.get_engine()
    connection = engine.connect()

    context.configure(connection=connection,
        compare_type=True,
        target_metadata=interface.schema.metadata,
        sqlalchemy_module_prefix=None)

    try:
        with context.begin_transaction():
            context.run_migrations()
    finally:
        connection.close()

if context.is_offline_mode():
    run_migrations_offline()
else:
    run_migrations_online()
Ejemplo n.º 10
0
from alembic import context
from spire.schema import Schema

interface = Schema.interface('flux')


def run_migrations_offline():
    context.configure(url=interface['url'])
    with context.begin_transaction():
        context.run_migrations()


def run_migrations_online():
    engine = interface.get_engine()
    connection = engine.connect()

    context.configure(connection=connection,
                      compare_type=True,
                      target_metadata=interface.schema.metadata,
                      sqlalchemy_module_prefix=None)

    try:
        with context.begin_transaction():
            context.run_migrations()
    finally:
        connection.close()


if context.is_offline_mode():
    run_migrations_offline()
else:
Ejemplo n.º 11
0
Archivo: env.py Proyecto: esho/yabl.keg
from alembic import context
from spire.schema import Schema

interface = Schema.interface('keg')

def run_migrations_offline():
    context.configure(url=interface['url'])
    with context.begin_transaction():
        context.run_migrations()

def run_migrations_online():
    engine = interface.get_engine()
    connection = engine.connect()

    context.configure(connection=connection,
        compare_type=True,
        target_metadata=interface.schema.metadata,
        sqlalchemy_module_prefix=None)

    try:
        with context.begin_transaction():
            context.run_migrations()
    finally:
        connection.close()

if context.is_offline_mode():
    run_migrations_offline()
else:
    run_migrations_online()
Ejemplo n.º 12
0
from alembic import context
from spire.schema import Schema

interface = Schema.interface('flux')

def run_migrations_offline():
    context.configure(url=interface['url'])
    with context.begin_transaction():
        context.run_migrations()

def run_migrations_online():
    engine = interface.get_engine()
    connection = engine.connect()

    context.configure(connection=connection,
        compare_type=True,
        target_metadata=interface.schema.metadata,
        sqlalchemy_module_prefix=None)

    try:
        with context.begin_transaction():
            context.run_migrations()
    finally:
        connection.close()

if context.is_offline_mode():
    run_migrations_offline()
else:
    run_migrations_online()