Skip to content

Commit 3930e8d

Browse files
committed
refactor: unify chat_id type as string across the project
- Changed SentMessage.chat_id to String to match Listable.chat_id - Converted all IDs in tg_ids.py to strings to avoid type coercion issues - Successfully altered the CockroachDB sent_messages table via SQLAlchemy
1 parent 0dcb453 commit 3930e8d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class SentMessage(Base):
3838
__tablename__ = 'sent_messages'
3939
id = Column(Integer, primary_key=True)
4040
command = Column(String, nullable=False)
41-
chat_id = Column(BigInteger, nullable=False)
41+
chat_id = Column(String, nullable=False)
4242
message_id = Column(BigInteger, nullable=False)
4343
timestamp = Column(DateTime, nullable=False, default=datetime.datetime.utcnow)
4444

tg_ids.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
DC_GROUP_CHATID = -1001067544716
1+
DC_GROUP_CHATID = "-1001067544716"
22
CODEPERS_CHATID = "-1001625164045"
3-
ROZEN_CHATID = 137497264
4-
DGARRO_CHATID = 187622583
3+
ROZEN_CHATID = "137497264"
4+
DGARRO_CHATID = "187622583"
55
NOTICIAS_CHATID = "@NoticiasDC"

0 commit comments

Comments
 (0)