refactor: rename database → storage

More semantically accurate: contains SQLite files, schema, fixtures, test data.
Updated all references in code, scripts, docs.
This commit is contained in:
Théophile Gervreau-Mercier
2026-02-12 12:12:58 +01:00
parent 0e4921583e
commit 7fca85d1c1
38 changed files with 131 additions and 131 deletions

View File

@@ -23,10 +23,10 @@ The `shared/config.php` file defines:
```php
// Test database (development)
DB_TEST_PATH = '/path/to/database/test.db'
DB_TEST_PATH = '/path/to/storage/test.db'
// Production database (server)
DB_PROD_PATH = '/path/to/database/posterg.db'
DB_PROD_PATH = '/path/to/storage/posterg.db'
```
## How It Works
@@ -35,7 +35,7 @@ DB_PROD_PATH = '/path/to/database/posterg.db'
By default, the system automatically determines which database to use:
1. **If `database/test.db` exists** → Use test database (development mode)
1. **If `storage/test.db` exists** → Use test database (development mode)
2. **Otherwise** → Use production database (production mode)
This means:
@@ -123,7 +123,7 @@ just deploy-database
To test with production data locally:
```bash
# Download production database (optional)
scp posterg:/var/www/html/database/posterg.db database/
scp posterg:/var/www/html/storage/posterg.db database/
# Remove test database to force production mode
rm database/test.db
@@ -177,5 +177,5 @@ if (isTestMode()) {
- **Explicit test deploy**: Use `just test-deploy` to explicitly deploy test.db when needed
- **Git ignored**: Test database is in `.gitignore` and never committed
- **Backups**: Production database should be backed up regularly
- **Schema**: Both databases use the same schema (`database/schema.sql`)
- **Schema**: Both databases use the same schema (`storage/schema.sql`)
- **Verification**: Run `rsync --dry-run` to preview what will be deployed before deploying