a3b996719a
Lib\Db (novaconium/lib/Db.php) is a thin, no-ORM PDO wrapper — lazy-connect like Lib\Csrf, Db::query() as the only query-running helper (prepared statements only, no interpolation shortcut, per Lib\Input's existing security stance). Plain .sql migrations under App/migrations/, applied in filename order and tracked in an auto-created schema_migrations table, run automatically on first connection or via novaconium/bin/migrate.php. Data lives in a new top-level data/ directory rather than novaconium/ or public/ — outside public/ so it's never web-accessible, and outside novaconium/ since that directory gets wholesale-replaced by the "Updating the framework" workflow, which would otherwise destroy it on every update. New config keys: db_driver (only 'sqlite' implemented), db_path, db_migrations_dir. Documented at /admin/docs/database and in AGENTS.md. Closes the "SQLite groundwork" backlog item in novaconium/ISSUES.md.
29 lines
1.0 KiB
PHP
29 lines
1.0 KiB
PHP
<?php
|
|
|
|
// Override any subset of novaconium/config.php's defaults here — only list
|
|
// the keys you want to change. novaconium/bootstrap.php (and
|
|
// novaconium/bin/clear-cache.php) shallow-merge this over the framework
|
|
// defaults; see /admin/docs/config. Uncomment and adjust any of the
|
|
// examples below, or leave this file returning an empty array to keep
|
|
// every framework default as-is.
|
|
return [
|
|
// 'debug' => false,
|
|
|
|
// 'site_name' => 'My Site',
|
|
|
|
// Docs: /admin/docs/matomo
|
|
// 'matomo_url' => 'https://matomo.example.com/',
|
|
// 'matomo_site_id' => '1',
|
|
|
|
// Docs: /admin/docs/admin-auth — generate a hash with:
|
|
// php -r "echo password_hash('yourpassword', PASSWORD_DEFAULT), PHP_EOL;"
|
|
// or use the built-in /admin/password-hash form.
|
|
// 'admin_username' => 'admin',
|
|
// 'admin_password_hash' => '$2y$10$...',
|
|
|
|
// Docs: /admin/docs/database
|
|
// 'db_driver' => 'sqlite',
|
|
// 'db_path' => __DIR__ . '/../data/novaconium.sqlite',
|
|
// 'db_migrations_dir' => __DIR__ . '/migrations',
|
|
];
|