From 4c7bde1400820f36caf8b2a5374007384c3018f3 Mon Sep 17 00:00:00 2001 From: winter Date: Mon, 9 Dec 2024 21:31:54 +0000 Subject: rename to Digitigrade / PawPub :3 --- WpfTest/Db.php | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 WpfTest/Db.php (limited to 'WpfTest/Db.php') diff --git a/WpfTest/Db.php b/WpfTest/Db.php deleted file mode 100644 index 799332f..0000000 --- a/WpfTest/Db.php +++ /dev/null @@ -1,42 +0,0 @@ -conn = new \PDO($conf->getDbConnection(), $conf->getDbUser(), $conf->getDbPassword(), [ - \PDO::ATTR_PERSISTENT => true, - ]); - } - - public function runInitialSchema() { - $this->conn->exec(file_get_contents(self::INIT_SCHEMA_PATH)); - } - - public function getDbVersion(): int { - $result = $this->conn->query('SELECT db_version FROM db_version'); - return $result->fetch()['db_version']; - } - - /** - * Changes the database schema version - * - * CAREFUL! this shouldn't be used unless you absolutely know why - * @param int $newVersion the new version number - * @return void - */ - public function setDbVersion(int $newVersion) { - $stmt = $this->conn->prepare('UPDATE db_version SET db_version = ?'); - $stmt->execute([$newVersion]); - } - - public function getPdo(): \PDO { - return $this->conn; - } -} \ No newline at end of file -- cgit v1.3