diff --git a/src/webserver/config/db.php b/src/webserver/config/db.php new file mode 100644 index 0000000..b9557d3 --- /dev/null +++ b/src/webserver/config/db.php @@ -0,0 +1,35 @@ +lastErrorMsg()); +} + +$conn->exec('PRAGMA journal_mode = wal;'); +$conn->exec('PRAGMA synchronous = NORMAL;'); + +if ($populate) { + // load the initial schema + $schema_file = realpath(dirname(__FILE__) . '/../../../db/sqlite/20240506-initialize-db.sql'); + $sql = file_get_contents($schema_file) or die("cannot get file contents for " . $schema_file); + + $conn->exec($sql); +} + +?>