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()
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()
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()
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()
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()
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()
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()
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()
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:
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()
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()