Exemple #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()
Exemple #2
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()
Exemple #3
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()
Exemple #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()
Exemple #5
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()
    finally:
        connection.close()
Exemple #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()
Exemple #7
0
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()
Exemple #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()
Exemple #9
0
Fichier : env.py Projet : 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()
Exemple #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:
Exemple #11
0
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()
Exemple #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()