From e4e0499e2d9affd95f7bc06e6b65a46bdcb379bd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 18 May 2014 08:16:20 +0200 Subject: add packagist table for upstream monitoring --- class/TablePackagist.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 class/TablePackagist.php (limited to 'class') diff --git a/class/TablePackagist.php b/class/TablePackagist.php new file mode 100644 index 0000000..74cc9ea --- /dev/null +++ b/class/TablePackagist.php @@ -0,0 +1,58 @@ +. + * + * @category Main + * @package RPMPHP + * + * @author Remi Collet + * @author Johan Cwiklinski + * @copyright 2014 Remi Collet + * @license http://www.gnu.org/licenses/agpl-3.0-standalone.html AGPL License 3.0 or (at your option) any later version + * @link http://github.com/remicollet/rpmphp/ + * @since The begining of times. +*/ +class TablePackagist extends CommonTable +{ + /** + * Create the table and populate it with known repo + * + * @return void + */ + protected function createTable() + { + // Table schema + $sql = "CREATE TABLE IF NOT EXISTS `packagist` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pkgname` varchar(100) NOT NULL, + `rpmname` varchar(200) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `pkgname` (`pkgname`), + UNIQUE KEY `rpmname` (`rpmname`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"; + $this->exec($sql); + } + +} -- cgit