Is there any way to store current revision number in the db? I mean, when I generate migration and upgrade head, how I can insert this revision number in the db, and check the table for this revision number in next time, when I will do a migration.
Asked
Active
Viewed 1,338 times
1 Answers
6
The current HEAD is automatically stored in the version_number
column in the alembic_version
table in your database. You can retrieve it with this query:
SELECT version_num FROM alembic_version;

snakecharmerb
- 47,570
- 11
- 100
- 153