Refactor code structure for improved readability and maintainability

This commit is contained in:
Boris D
2025-09-09 13:28:39 +03:00
parent 5572bf48b7
commit afb1f343e0
23 changed files with 4239 additions and 0 deletions

49
MIGRATIONS.md Normal file
View File

@ -0,0 +1,49 @@
# TypeORM Migrations Guide
This project uses TypeORM migrations for database schema management in production environments.
## Migration Commands
### Generate Migration
Generate a migration file based on entity changes:
```bash
# Start the database first
yarn docker:dev:detached
# Generate migration from entity changes
yarn migration:generate src/migrations/YourMigrationName
```
### Create Empty Migration
Create an empty migration file for custom SQL:
```bash
yarn migration:create src/migrations/YourMigrationName
```
### Run Migrations
Apply pending migrations to the database:
```bash
yarn migration:run
```
### Revert Migration
Revert the last applied migration:
```bash
yarn migration:revert
```
### Show Migration Status
Show which migrations have been applied:
```bash
yarn migration:show
```