перенос миграций с alembic

This commit is contained in:
Artem Tsyrulnikov
2025-12-11 16:40:30 +03:00
parent 02729ce81b
commit 38f1b3feba
12 changed files with 293 additions and 592 deletions

View File

@@ -22,9 +22,8 @@ class ExternalChannel(TimestampedModel):
'models.User', related_name='external_channels', on_delete=fields.CASCADE, index=True
)
target_channels: fields.ManyToManyRelation['TargetChannel']
if TYPE_CHECKING:
target_channels: fields.ManyToManyRelation['TargetChannel']
user_id: UUID
class Meta:

View File

@@ -32,6 +32,8 @@ class TargetChannel(TimestampedModel):
'models.ExternalChannel',
related_name='target_channels',
through='target_external_channel',
forward_key='external_channel_id',
backward_key='target_channel_id',
)
if TYPE_CHECKING: