Skip to content

Commit 6d5e404

Browse files
committed
fix creation of tables
1 parent 63d85f4 commit 6d5e404

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

TelegramBot.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ public function __construct(\PDO $dbh, string $token) {
6161
$dbh->exec('CREATE TABLE IF NOT EXISTS `tgnb_chats` (
6262
`chat_id` INTEGER,
6363
`date_added` INTEGER,
64-
PRIMARY KEY(`id`)
64+
PRIMARY KEY(`chat_id`)
6565
);');
6666

6767
$dbh->exec('CREATE TABLE IF NOT EXISTS `tgnb_updates` (
6868
`update_id` INTEGER,
6969
`date_added` INTEGER,
7070
`update_json` TEXT,
71-
PRIMARY KEY(`id`)
71+
PRIMARY KEY(`update_id`)
7272
);');
7373

7474
$dbh->exec('CREATE TABLE IF NOT EXISTS `tgnb_messages` (
@@ -92,7 +92,7 @@ public function __construct(\PDO $dbh, string $token) {
9292
/**
9393
* Call the api with parameters.
9494
*
95-
* @param string $endpoint Name of endpoint without prefix /
95+
* @param string $endpoint Name of endpoint without prefixed /
9696
* @param array $parameters Associative array with parameters to send.
9797
*/
9898
public function queryApi(string $endpoint, array $parameters = []) {

0 commit comments

Comments
 (0)