mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -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
23
CLAUDE.md
23
CLAUDE.md
|
@ -17,12 +17,13 @@ TorrentPier is a BitTorrent tracker engine written in PHP, designed for hosting
|
|||
## Key Directory Structure
|
||||
|
||||
- `/src/` - Modern PHP classes (PSR-4 autoloaded as `TorrentPier\`)
|
||||
- `/library/` - Core application logic and legacy code
|
||||
- `/library/` - Core application logic and legacy code
|
||||
- `/admin/` - Administrative interface
|
||||
- `/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
|
||||
|
||||
|
@ -86,7 +87,7 @@ The project uses **StyleCI** with PSR-2 preset for code style enforcement. Style
|
|||
|
||||
### CI/CD Pipeline
|
||||
- **GitHub Actions** for automated testing and deployment
|
||||
- **StyleCI** for code style enforcement
|
||||
- **StyleCI** for code style enforcement
|
||||
- **Dependabot** for dependency updates
|
||||
- **FTP deployment** to demo environment
|
||||
|
||||
|
@ -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