Closed mcindea closed 4 years ago
Hi.
First of all, DATABASES
and CLICKHOUSE_DATABASES
in django settings are not somehow connected to each other.
DATABASES
parameter configures databases, used with django QuerySet/Model system. It has engine
attribute, which tells django what driver it should use for this connection (PostgreSQL, MySQL, Oracle etc). You can read more about it here.
CLICKHOUSE_DATABASES
is a parameter, introduced by this library. It determines connections, which can be used with this library QuerySet/ClickHouseModel system only. It's structure is very much like DATABASES
. But attributes are different (they are described here):
engine
as the only database it works with is ClickHouse.migrate
attribute, introduced by library in order to have ability to disable migrations for connection (for instance, if you have multiple connections to single database)Unlike django, ClickHouse Engine defines mechanics of each table work. You can read more about it here. In this library it is set as ClickHouseModel attribute.
I close issue, for no response. You may reopen issue, if you have more questions.
First of all thank you for all the work, you've done tremendous amount of dedication!
I want to ask a n00b question, I am new to Django, and I can't figure out how to set it up in settings.py since DATABASES and CLICKHOUSE_DATABASES are different, and I can't figure out the Django engine I should use. I've went through the PR with docs, but still couldn't figure it out. Can you please give me a hint?
Thank you!