2018-11-15 11:02:05 +03:00
|
|
|
from django_clickhouse.clickhouse_models import ClickHouseModel
|
2018-11-15 14:50:38 +03:00
|
|
|
from django_clickhouse.engines import MergeTree
|
|
|
|
from infi.clickhouse_orm import fields
|
|
|
|
|
2018-11-15 11:02:05 +03:00
|
|
|
from tests.models import TestModel
|
|
|
|
|
|
|
|
|
|
|
|
class TestClickHouseModel(ClickHouseModel):
|
|
|
|
django_model = TestModel
|
|
|
|
sync_delay = 5
|
2018-11-15 14:50:38 +03:00
|
|
|
|
2018-11-15 15:37:58 +03:00
|
|
|
id = fields.Int32Field()
|
2018-11-15 14:50:38 +03:00
|
|
|
created_date = fields.DateField()
|
2018-11-15 15:37:58 +03:00
|
|
|
value = fields.Int32Field()
|
2018-11-15 14:50:38 +03:00
|
|
|
|
|
|
|
engine = MergeTree('created_Date')
|