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=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from localhost.localdomain (unknown [101.128.125.157]) by gnuweeb.org (Postfix) with ESMTPSA id 722C5807C9; Sat, 30 Jul 2022 04:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1659156036; bh=YW81AVAJYpco1pieDcBb1FL6dFH9+HP8quZL/zaiXzc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ommLOMdw++3kQsXZzKVhEQe2pP9drCHTz0uAzK+XlUSF4Me/koReDyP1Td+Ss/f+H 2pnYP7jghX76O4W4VIvkIeUwlkiCiIENWTjnZ8MzlS7GmrWdR3cED5eEGm861jy7Vr /4F2wT+SsL/eqk8nK8FkspAb9laFOl61FtRzWHMSihMuUIqqHEWiFEVU3L2wqr7PD+ q6cQF9Q303y0uWYytVnqcoKdQYflIsmzPNDFItIiTy+Fm7SrUFeUE9gu5ld20zH1Zt kd9CaG7DfCzxpMPTxtz/tjaapzAq89qdI4sFxGqq19aV6caYzEvYohtLNIC66HzQgf R9mGhIQNABCKw== From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , GNU/Weeb Mailing List , Alviro Iskandar Setiawan Subject: [PATCH v4 01/18] Add new table for atom URLs and broadcast chats in db.sql Date: Sat, 30 Jul 2022 11:39:59 +0700 Message-Id: <20220730044016.988-2-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20220730044016.988-1-kiizuha@gnuweeb.org> References: <20220730044016.988-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Just add new table for atom URLs and broadcast chats in db.sql to save them in MySQL database. Signed-off-by: Muhammad Rizki --- .gitignore | 1 + daemon/db.sql | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.gitignore b/.gitignore index ca28962..fe72ab9 100644 --- a/.gitignore +++ b/.gitignore @@ -136,4 +136,5 @@ data.json # VSCode editor .vscode/ +# PATCH *.patch diff --git a/daemon/db.sql b/daemon/db.sql index 0e4841a..ac6ed0d 100644 --- a/daemon/db.sql +++ b/daemon/db.sql @@ -34,4 +34,29 @@ CREATE TABLE `tg_emails` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci; +DROP TABLE IF EXISTS `atom_urls`; +CREATE TABLE `atom_urls` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL, + `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, + `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-07 14:25:28 -- Muhammad Rizki