Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
Archivo: core.py Proyecto: florv/indico
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)
Ejemplo n.º 4
0
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)
Ejemplo n.º 5
0
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)