From 2adc9b84a0108c55ac6a8501c10ce863cfdcf7e7 Mon Sep 17 00:00:00 2001 From: M1hacka Date: Wed, 3 Jun 2020 11:17:20 +0500 Subject: [PATCH] Fixed import compatibility with new version on infi.clickhouse-orm --- setup.py | 2 +- src/django_clickhouse/migrations.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a4be5f9..2527a4f 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ with open('requirements.txt') as f: setup( name='django-clickhouse', - version='1.0.0', + version='1.0.1', packages=['django_clickhouse'], package_dir={'': 'src'}, url='https://github.com/carrotquest/django-clickhouse', diff --git a/src/django_clickhouse/migrations.py b/src/django_clickhouse/migrations.py index 62ccd18..9d47688 100644 --- a/src/django_clickhouse/migrations.py +++ b/src/django_clickhouse/migrations.py @@ -7,8 +7,13 @@ from typing import Optional, Set from django.db import DEFAULT_DB_ALIAS as DJANGO_DEFAULT_DB_ALIAS from django.db.models.signals import post_migrate from django.dispatch import receiver -from infi.clickhouse_orm.database import ServerError, DatabaseException + +# In order to support all operations import here from infi.clickhouse_orm.migrations import * + +from infi.clickhouse_orm.database import ServerError, DatabaseException +from infi.clickhouse_orm.fields import StringField, DateField +from infi.clickhouse_orm.engines import MergeTree from infi.clickhouse_orm.utils import import_submodules from .clickhouse_models import ClickHouseModel