anitab-org / anitab-org/mentorship-backend

Write on README how to create and run db migration script

Ouverte
#996 3 commentaires 0 réactions 1 personne assignée Réclamée par @mtreacy002 Voir sur GitHub
Category: Documentation/Training
Langage dominant
Python
Étoiles
200
Forks
449
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

## Description

As a developer,
I need steps to create an Alembic migration script,
so that I can know how to create migration script and upgrade database schema version.

Write couple steps concisely on README to explain how to create and run migration script

**tip:** If you are inexperienced with alembic migrations, it might be worth it to try this out your self, by changing a property in a database model (sqlalchemy) and create script + upgrade/downgrade versions. If you use `local` env variable, your db will be sqlite based, so easily deleted and created.

**References:**
- https://github.com/anitab-org/mentorship-backend/pull/335 this PR introduced support to flask migrate, so "how do I use it?" section might help with this.
- https://flask-migrate.readthedocs.io/en/latest/

## Acceptance Criteria
### Update [Required]
- [ ] Steps to do this are concisely explained on a separate README section

## Definition of Done
- [ ] All of the required items are completed.
- [x] Approval by 1 mentor.

## Estimation
1 hours

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.