From 6d5e404c1a4a18ef63328664bf22cd84caa8ba0f Mon Sep 17 00:00:00 2001 From: JuliusPC Date: Sun, 10 May 2020 16:54:40 +0200 Subject: [PATCH] fix creation of tables --- TelegramBot.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TelegramBot.php b/TelegramBot.php index d694c08..d4feb6e 100644 --- a/TelegramBot.php +++ b/TelegramBot.php @@ -61,14 +61,14 @@ public function __construct(\PDO $dbh, string $token) { $dbh->exec('CREATE TABLE IF NOT EXISTS `tgnb_chats` ( `chat_id` INTEGER, `date_added` INTEGER, - PRIMARY KEY(`id`) + PRIMARY KEY(`chat_id`) );'); $dbh->exec('CREATE TABLE IF NOT EXISTS `tgnb_updates` ( `update_id` INTEGER, `date_added` INTEGER, `update_json` TEXT, - PRIMARY KEY(`id`) + PRIMARY KEY(`update_id`) );'); $dbh->exec('CREATE TABLE IF NOT EXISTS `tgnb_messages` ( @@ -92,7 +92,7 @@ public function __construct(\PDO $dbh, string $token) { /** * Call the api with parameters. * - * @param string $endpoint Name of endpoint without prefix / + * @param string $endpoint Name of endpoint without prefixed / * @param array $parameters Associative array with parameters to send. */ public function queryApi(string $endpoint, array $parameters = []) {