fix+feat(everything): lot of things
Some checks failed
Deploy to Development / build-and-deploy (push) Failing after 20s
Some checks failed
Deploy to Development / build-and-deploy (push) Failing after 20s
This commit is contained in:
43
backend/migrations/README.md
Normal file
43
backend/migrations/README.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Migrations Alembic
|
||||
|
||||
Ce dossier contient les migrations de base de données gérées par Alembic.
|
||||
|
||||
## Commandes utiles
|
||||
|
||||
### Créer une nouvelle migration
|
||||
```bash
|
||||
alembic revision --autogenerate -m "Description de la migration"
|
||||
```
|
||||
|
||||
### Appliquer les migrations
|
||||
```bash
|
||||
alembic upgrade head
|
||||
```
|
||||
|
||||
### Revenir en arrière d'une migration
|
||||
```bash
|
||||
alembic downgrade -1
|
||||
```
|
||||
|
||||
### Voir l'historique des migrations
|
||||
```bash
|
||||
alembic history
|
||||
```
|
||||
|
||||
### Voir la migration actuelle
|
||||
```bash
|
||||
alembic current
|
||||
```
|
||||
|
||||
### Créer une migration vide (sans autogenerate)
|
||||
```bash
|
||||
alembic revision -m "Description de la migration"
|
||||
```
|
||||
|
||||
## Notes importantes
|
||||
|
||||
- Les migrations sont automatiquement détectées depuis les modèles SQLAlchemy dans `models/`
|
||||
- Ne modifiez jamais manuellement les fichiers de migration existants
|
||||
- Testez toujours les migrations en développement avant de les appliquer en production
|
||||
- En cas de problème, vous pouvez toujours revenir en arrière avec `alembic downgrade`
|
||||
|
||||
Reference in New Issue
Block a user