GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
From: Muhammad Rizki <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: GNU/Weeb Mailing List <[email protected]>
Subject: Re: [PATCH v1 01/18] Add atom_broadcast.sql
Date: Thu, 28 Jul 2022 12:00:41 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 27/07/2022 21.45, Ammar Faizi wrote:
> On 7/27/22 9:46 AM, Muhammad Rizki wrote:
>> Just add an atom_broadcast.sql file to create new table.
>>
>> Signed-off-by: Muhammad Rizki <[email protected]>
>> ---
>>   .gitignore                |  4 ++++
>>   daemon/atom_broadcast.sql | 25 +++++++++++++++++++++++++
>>   2 files changed, 29 insertions(+)
>>   create mode 100644 daemon/atom_broadcast.sql
> 
> Please don't create another SQL file, just use the same database with
> different table. I really don't see the need to use 2 databases. Hmmm?
> 

Oh yes I forget to combine the SQL with the old one, I will amend 
thiscommit and merge atom_broadcast.sql with the old one.

>> +CREATE TABLE `atom_urls` (
>> +  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
>> +  `url` varchar(64) CHARACTER SET utf8mb4 COLLATE 
>> utf8mb4_unicode_520_ci NOT NULL,
> 
> Just max this one out to varchar(255).
> 

Noted, thanks!

>> +  `created_at` datetime NOT NULL,
>> +  PRIMARY KEY (`id`),
>> +  UNIQUE KEY `url` (`url`),
>> +  KEY `created_at` (`created_at`)
>> +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
>> +
>> +DROP TABLE IF EXISTS `broadcast_chats`;
>> +CREATE TABLE `broadcast_chats` (
>> +  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
>> +  `chat_id` bigint NOT NULL,
>> +  `username` varchar(32),
>> +  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE 
>> utf8mb4_unicode_520_ci NOT NULL,
>> +  `type` varchar(32) NOT NULL,
> 
> What is the purpose of the `type` field here?
> 

It's a chat type to define is it a group chat or private chat, so what 
I'm thinking is, if someone want to receive via private chat I just
make the `type` column. If this is not necessary I can just amend
this commit and edit all related code.

>> +  `link` varchar(64),
>> +  `created_at` datetime NOT NULL,
>> +  PRIMARY KEY (`id`),
>> +  UNIQUE KEY `chat_id` (`chat_id`),
>> +  KEY `created_at` (`created_at`)
>> +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
>> +
>> +-- 2022-07-25 09:26:43
> 


  reply	other threads:[~2022-07-28  5:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27  2:46 [PATCH v1 00/18] New feature to handle atom URLs and broadcast Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 01/18] Add atom_broadcast.sql Muhammad Rizki
2022-07-27 14:45   ` Ammar Faizi
2022-07-28  5:00     ` Muhammad Rizki [this message]
2022-07-28  5:15       ` Ammar Faizi
2022-07-27  2:46 ` [PATCH v1 02/18] Add ATOM_URLS and BROADCAST_CHAT methods Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 03/18] Fix MySQL InternalError: Unread result found Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 04/18] Create /add_atom command Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 05/18] Add utility functions for /add_atom Muhammad Rizki
2022-07-27 15:09   ` Ammar Faizi
     [not found]     ` <[email protected]>
2022-07-28  4:06       ` Ammar Faizi
2022-08-10 22:05       ` Ammar Nofan Faizi
2022-08-11  2:41         ` Muhammad Rizki
2022-08-11  2:47           ` Ammar Nofan Faizi
2022-08-11  2:56             ` Ammar Nofan Faizi
2022-07-27  2:46 ` [PATCH v1 06/18] Refactor database methods Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 07/18] Add insert_atom() in scraper/db.py Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 08/18] Rename admin.py to debugger.py Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 09/18] Add delete_atom() function in scraper/db.py Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 10/18] Add utility function buton_numbers() Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 11/18] Move bot commands related files to packages/plugins/commands/ Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 12/18] Add del_atom callback query Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 13/18] Add insert_broadcast() in scraper/db.py Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 14/18] Add delete_broadcast() " Muhammad Rizki
2022-07-27 15:01   ` Ammar Faizi
2022-07-27  2:46 ` [PATCH v1 15/18] Create /add_bc bot command Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 16/18] Add create_chat_link() function Muhammad Rizki
2022-07-27 15:12   ` Ammar Faizi
     [not found]     ` <[email protected]>
2022-07-28  4:07       ` Ammar Faizi
2022-07-27  2:46 ` [PATCH v1 17/18] Add /del_bc bot command Muhammad Rizki
2022-07-27  2:46 ` [PATCH v1 18/18] Add del_chat callback query Muhammad Rizki
2022-07-29  0:40 [PATCH v1 00/18] New feature to handle atom URLs and broadcast Muhammad Rizki
2022-07-29  0:40 ` [PATCH v1 01/18] Add atom_broadcast.sql Muhammad Rizki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox