mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2024-11-28 20:13:45 +03:00
Bugfix in installing migrations
This commit is contained in:
parent
73bcaf29f0
commit
04c5ba292a
|
@ -119,12 +119,11 @@ class MigrationHistory(ClickHouseModel):
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
# Ensure that table for migration storing is created
|
# Ensure that table for migration storing is created
|
||||||
for db_alias in cls.migrate_non_replicated_db_aliases:
|
for db_name in cls.migrate_non_replicated_db_aliases:
|
||||||
connections[db_alias].create_table(cls)
|
connections[db_name].create_table(cls)
|
||||||
|
|
||||||
cls.objects.bulk_create([
|
cls.objects.create(db_alias=db_alias, package_name=migrations_package, module_name=name,
|
||||||
cls(db_alias=db_alias, package_name=migrations_package, module_name=name, applied=datetime.date.today())
|
applied=datetime.date.today())
|
||||||
])
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_applied_migrations(cls, db_alias, migrations_package): # type: (str, str) -> Set[str]
|
def get_applied_migrations(cls, db_alias, migrations_package): # type: (str, str) -> Set[str]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user