-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f80cf99
commit 80feafc
Showing
6 changed files
with
50 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
<?php | ||
/* | ||
THIS SCRIPT WILL SELF-DESTRUCT AFTER EXECUTION! | ||
The purpose of this script is clear: create table `updates` inside your RDBMS. | ||
Everyone loves auto-installers, right? | ||
(Make sure your DB data are VALID before executing this script.) | ||
*/ | ||
$db = include_once(__DIR__."/include/use_db.php"); | ||
|
||
$db->pdo->query("CREATE TABLE IF NOT EXISTS `updates` ( | ||
$db->pdo->query( | ||
"CREATE TABLE IF NOT EXISTS `updates` ( | ||
`update_id` bigint(20) NOT NULL, | ||
`message_id` bigint(20) NOT NULL, | ||
`from_id` bigint(20) NOT NULL, | ||
`from_username` varchar(255) NOT NULL, | ||
`date` bigint(20) NOT NULL, | ||
`text` text NOT NULL, | ||
PRIMARY KEY (`update_id`,`message_id`) | ||
)"); | ||
)"); | ||
|
||
unlink(__FILE__); | ||
class SelfDestroy{function __destruct(){unlink(__FILE__);}} | ||
$installation_finished = new DeleteOnExit(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters