コード例 #1
0
ファイル: core.py プロジェクト: MichelCordeiro/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:
        CreateSchema(schema).execute_if(callable_=_should_create_schema).execute(connection)
    # Create the indico_unaccent function
    create_unaccent_function(connection)
コード例 #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)
コード例 #3
0
ファイル: core.py プロジェクト: 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)
コード例 #4
0
ファイル: core.py プロジェクト: innovexa/IDC-Events
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)
コード例 #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)