35 lines
902 B
Markdown
35 lines
902 B
Markdown
# Patches Directory
|
|
|
|
This directory contains schema patch files for database evolution.
|
|
|
|
## Structure
|
|
|
|
Each patch is stored in its own directory:
|
|
```
|
|
Patches/
|
|
├── 001-initial-schema/
|
|
│ ├── 01_create_users.sql
|
|
│ ├── 02_add_indexes.sql
|
|
│ └── 03_seed_data.py
|
|
├── 002-add-authentication/
|
|
│ └── 01_auth_tables.sql
|
|
```
|
|
|
|
## Workflow
|
|
|
|
1. Create release: `half_orm dev release create <level>`
|
|
2. Create patch branch: `half_orm dev patch create <patch-id>`
|
|
3. Add SQL/Python files to Patches/<patch-id>/
|
|
4. Apply patch: `half_orm dev patch apply`
|
|
5. Test your changes
|
|
6. Merge patch: `git checkout ho-patch/<patch-id> && half_orm dev patch merge`
|
|
|
|
## File Naming
|
|
|
|
- Use numeric prefixes for ordering: `01_`, `02_`, etc.
|
|
- SQL files: `*.sql`
|
|
- Python scripts: `*.py`
|
|
- Files executed in lexicographic order
|
|
|
|
See docs/half_orm_dev.md for complete documentation.
|