From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.88.254] (unknown [125.160.106.238]) by gnuweeb.org (Postfix) with ESMTPSA id 95FB47FA25; Wed, 27 Jul 2022 14:45:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1658933133; bh=Gp5zUMqZH2fdDt1xTqSdJGq6Ei/rmL/fv6lbppjech0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=o5i6om8m38gjgwBX0/yplRWxAM21aQFdJiacpXV0PGXVV5exP+xYKr5ggWEEaTXH2 S2RA9gk10GNI2LOheAf+7415ElphKu+3SHIA/2WZEkzI8CY0Vp2odCOsppS+hooVm8 1qURL4xmfeBHAkUgYEfpUi6PuUzEkDEEkYHm29nAI+MsFmvtf7y2Izn0Eu5nQ0Olzu Q2tEGFVU6qTDQu14u0Rmz8h7DQr9Cq6SS+67IF+YaAUeRJhwtPhE2FyQyZbtZP/am+ YEAm42vVISCsRnCIE7b85zmF9M+NVIFQrDbLwXVPlwcSrPhJfFswBan7gMpHmTfV7B 9ENQ3mGlU5X1g== Message-ID: <41a58ac3-490d-6268-5095-0e6ea65f937e@gnuweeb.org> Date: Wed, 27 Jul 2022 21:45:27 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v1 01/18] Add atom_broadcast.sql Content-Language: en-US To: Muhammad Rizki Cc: GNU/Weeb Mailing List References: <20220727024634.1995-1-kiizuha@gnuweeb.org> <20220727024634.1995-2-kiizuha@gnuweeb.org> From: Ammar Faizi In-Reply-To: <20220727024634.1995-2-kiizuha@gnuweeb.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: 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 > --- > .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? > +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). > + `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? > + `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 -- Ammar Faizi