diff options
author | Andrew Dolgov <[email protected]> | 2021-03-05 21:14:35 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-03-05 21:14:35 +0300 |
commit | 2b8b845abe7c13ecbb266613910484310cffe8e1 (patch) | |
tree | 90bd2e93737c2aad17cfb09496cc57cf3f9968cd /common.php | |
parent | b2341679d53b227fc90fba34c3a7e6453e3cad6e (diff) |
* use ORM for trivial queries
* environment-based configuration
* useradm.php -> update.php with new options
* support for schema migrations
* various fixes
Diffstat (limited to 'common.php')
-rw-r--r-- | common.php | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/common.php b/common.php deleted file mode 100644 index 367ae55..0000000 --- a/common.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -function sanity_check() { - - if (!is_writable(SCRATCH_DB)) { - die(SCRATCH_DB . " is not writable"); - } - - if (!is_writable(dirname(SCRATCH_DB))) { - die(dirname(SCRATCH_DB) . " directory is not writable"); - } - - try { - $dbh = new PDO("sqlite:" . SCRATCH_DB); - - $res = $dbh->query("SELECT id FROM epube_users LIMIT 1"); - - if (!$res) { - die("Test query failed, is schema installed? (sqlite3 " . SCRATCH_DB . "< schema.sql)"); - } - - } catch (Exception $e) { - die($e); - } - -}
\ No newline at end of file |