Audit-Alembic <https://github.com/jpassaro/Audit-Alembic> meets the 
requirement. It creates an alembic_version_history table, and populates it 
with Alembic events. Unfortunately, it was last updated three years ago and 
I believe is out of date (it's check for whether 'on_version_apply' exists 
fails). And I can't figure out how to get access to the message/slug from 
within env.py. But it does work in the trivial case.

On Wednesday, August 19, 2020 at 1:55:45 PM UTC-4 Mike Bayer wrote:

> this is issue 309 https://github.com/sqlalchemy/alembic/issues/309  
> waiting for someone with the time and motivation to work on it.
>
>
>
> On Wed, Aug 19, 2020, at 11:25 AM, Jasen Jacobsen wrote:
>
> I've used Liquibase in the past and as part of its migration tracking it 
> creates a table which lists each migration applied. See Liquibase 
> Changelog Table 
> <https://docs.liquibase.com/concepts/basic/databasechangelog-table.html>.
> Alembic has the alembic_version table, but it only holds a single row and 
> column (version_num).
> Is there a way to have Alembic populate a table similarly to Liquibase? 
> (And not manually adding statements to each migration script.) Something 
> that would grab the 'slug', Create Date, Revision ID, and applied date for 
> each migration script and add a row to a table. Maybe something to be used 
> in configure(on_version_apply)?
>
> Thanks for any pointers.
>
>
> --
> SQLAlchemy - 
> The Python SQL Toolkit and Object Relational Mapper
>  
> http://www.sqlalchemy.org/
>  
> To post example code, please provide an MCVE: Minimal, Complete, and 
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
> description.
> --- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy/c7fa8044-a5c9-4941-8d93-71d9663f4e60n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sqlalchemy/c7fa8044-a5c9-4941-8d93-71d9663f4e60n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/2e7d674c-3388-424a-a49a-f7a79850fdacn%40googlegroups.com.

Reply via email to