Skip to content

Commit

Permalink
fix creation of tables
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliusPC committed May 10, 2020
1 parent 63d85f4 commit 6d5e404
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TelegramBot.php
Original file line number Diff line number Diff line change
Expand Up @@ -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` (
Expand All @@ -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 = []) {
Expand Down

0 comments on commit 6d5e404

Please sign in to comment.