mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
docs: enhance CLAUDE.md with migration details and directory updates
- Updated the `/library/` section to clarify its purpose. - Added a new `/migrations/` directory section detailing database migration files managed by Phinx. - Included migration commands for running and checking migration status. - Revised the initial schema and seed data references for clarity. - Improved formatting for consistency throughout the document.
This commit is contained in:
parent
b0215a11bc
commit
5af6a9433a
1 changed files with 19 additions and 4 deletions
19
CLAUDE.md
19
CLAUDE.md
|
@ -22,7 +22,8 @@ TorrentPier is a BitTorrent tracker engine written in PHP, designed for hosting
|
|||
- `/bt/` - BitTorrent tracker functionality (announce.php, scrape.php)
|
||||
- `/styles/` - Templates, CSS, JS, images
|
||||
- `/internal_data/` - Cache, logs, compiled templates
|
||||
- `/install/` - Installation scripts and SQL schema
|
||||
- `/install/` - Installation scripts and configuration examples
|
||||
- `/migrations/` - Database migration files (Phinx)
|
||||
|
||||
## Entry Points & Key Files
|
||||
|
||||
|
@ -97,10 +98,24 @@ The project uses **StyleCI** with PSR-2 preset for code style enforcement. Style
|
|||
|
||||
## Database & Schema
|
||||
|
||||
- MySQL schema: `/install/sql/mysql.sql`
|
||||
- **Database migrations** managed via Phinx in `/migrations/` directory
|
||||
- Initial schema: `20250619000001_initial_schema.php`
|
||||
- Initial seed data: `20250619000002_seed_initial_data.php`
|
||||
- UTF-8 (utf8mb4) character set required
|
||||
- Multiple database alias support for different components
|
||||
|
||||
### Migration Commands
|
||||
```bash
|
||||
# Run all pending migrations
|
||||
php vendor/bin/phinx migrate --configuration=phinx.php
|
||||
|
||||
# Check migration status
|
||||
php vendor/bin/phinx status --configuration=phinx.php
|
||||
|
||||
# Mark migrations as applied (for existing installations)
|
||||
php vendor/bin/phinx migrate --fake --configuration=phinx.php
|
||||
```
|
||||
|
||||
## Legacy Compatibility Strategy
|
||||
|
||||
The codebase maintains 100% backward compatibility while introducing modern alternatives:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue