Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
- Register TelegramCommunicationConfig in INSTALLED_APPS and add telegram_db to DATABASES - Define TelegramData model mapped to the messages table - Fix allow_migrate in ProjectDatabaseRouter: redirect and telegram entries were returning the DB name string (always truthy) instead of a boolean comparison, causing their migrations to bleed into every database - Add telegram routing to db_for_read, db_for_write, allow_relation, and allow_migrate Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
445 B
Python
13 lines
445 B
Python
from django.db import models
|
|
|
|
|
|
class TelegramData(models.Model):
|
|
message_id = models.IntegerField(null=False)
|
|
chat_id = models.IntegerField(null=False)
|
|
description = models.CharField(max_length=100, null=True)
|
|
creation_date = models.DateField(blank=True, null=False, verbose_name='Published')
|
|
expiration_date = models.DateField(blank=True, null=False, verbose_name='Published')
|
|
class Meta:
|
|
db_table = 'messages'
|
|
|