mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2025-05-29 18:23:19 +03:00
add hints to migration operators
This commit is contained in:
parent
01cec7c999
commit
42fd99b88b
41
src/django_clickhouse/migration_operators.py
Normal file
41
src/django_clickhouse/migration_operators.py
Normal file
|
@ -0,0 +1,41 @@
|
|||
from infi import clickhouse_orm
|
||||
|
||||
|
||||
class HintParamMixin:
|
||||
def __init__(self, *args, hints=None, **kwargs):
|
||||
if hints is None:
|
||||
hints = dict()
|
||||
self.hints = hints
|
||||
super(HintParamMixin, self).__init__(*args, **kwargs)
|
||||
|
||||
|
||||
class CreateTable(HintParamMixin, clickhouse_orm.CreateTable):
|
||||
pass
|
||||
|
||||
|
||||
class AlterTable(HintParamMixin, clickhouse_orm.AlterTable):
|
||||
pass
|
||||
|
||||
|
||||
class AlterTableWithBuffer(HintParamMixin, clickhouse_orm.AlterTableWithBuffer):
|
||||
pass
|
||||
|
||||
|
||||
class DropTable(HintParamMixin, clickhouse_orm.DropTable):
|
||||
pass
|
||||
|
||||
|
||||
class AlterConstraints(HintParamMixin, clickhouse_orm.AlterConstraints):
|
||||
pass
|
||||
|
||||
|
||||
class AlterIndexes(HintParamMixin, clickhouse_orm.AlterIndexes):
|
||||
pass
|
||||
|
||||
|
||||
class RunPython(HintParamMixin, clickhouse_orm.RunPython):
|
||||
pass
|
||||
|
||||
|
||||
class RunSQL(HintParamMixin, clickhouse_orm.RunSQL):
|
||||
pass
|
Loading…
Reference in New Issue
Block a user