def _distribute_citus_tables(apps, schema_editor):
    with schema_editor.connection.cursor() as cursor:
        if not is_citus_db(cursor):
            return

        for table, col in [(AGG_ADOLESCENT_GIRLS_REGISTRATION_TABLE, 'supervisor_id')]:
            create_citus_distributed_table(cursor, table, col)
def _distribute_citus_tables(apps, schema_editor):
    with schema_editor.connection.cursor() as cursor:
        if not is_citus_db(cursor):
            return

        for table, col in [(AGG_AVAILING_SERVICES_TABLE, 'supervisor_id')]:
            create_citus_distributed_table(cursor, table, col)
Пример #3
0
def _distribute_citus_tables(apps, schema_editor):
    with schema_editor.connection.cursor() as cursor:
        if not is_citus_db(cursor):
            return

        for table, col in DISTRIBUTED_TABLES:
            create_citus_distributed_table(cursor, table, col)

        for table in REFERENCE_TABLES:
            create_citus_reference_table(cursor, table)
Пример #4
0
 def _is_citus(self, schema_editor):
     with schema_editor.connection.cursor() as cursor:
         return is_citus_db(cursor)