def _before_create(target, connection, **kw): # SQLAlchemy doesn't create schemas so we need to take care of it... schemas = {table.schema for table in kw['tables']} for schema in schemas: CreateSchema(schema).execute_if(callable_=_should_create_schema).execute(connection) # Create the indico_unaccent function create_unaccent_function(connection)
def _before_create(target, connection, **kw): # SQLAlchemy doesn't create schemas so we need to take care of it... schemas = {table.schema for table in kw['tables']} for schema in schemas: CreateSchema(schema).execute_if( callable_=_should_create_schema).execute(connection) # Create the indico_unaccent function create_unaccent_function(connection)
def _before_create(target, connection, **kw): # SQLAlchemy doesn't create schemas so we need to take care of it... schemas = {table.schema for table in kw['tables']} for schema in schemas: if not _schema_exists(connection, schema): CreateSchema(schema).execute(connection) signals.db_schema_created.send(unicode(schema), connection=connection) # Create the indico_unaccent function create_unaccent_function(connection)
def _before_create(target, connection, **kw): # SQLAlchemy doesn't create schemas so we need to take care of it... schemas = {table.schema for table in kw['tables']} for schema in schemas: if not _schema_exists(connection, schema): CreateSchema(schema).execute(connection) signals.core.db_schema_created.send(str(schema), connection=connection) # Create our custom functions create_unaccent_function(connection) create_natsort_function(connection)