Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does an Alembic revision ID represent?

I have just started looking at Alembic, and coming from Django, where we have South to migrate our database schemas (which is soon to be included) which uses a friendly old fixed-width number like 0037_fix_my_schema.py to talk about the order in which migrations are to be applied, I am naturally intrigued by Alembic's revision ID. Is there a DAG backing Alembic, or can someone give a little overview of its internals in this respect?

like image 830
bmcorser Avatar asked Jan 11 '23 22:01

bmcorser


1 Answers

I took a look myself. The source says:

def rev_id():
    val = int(uuid.uuid4()) % 100000000000000
    return hex(val)[2:-1]

Not so fascinating.

like image 128
bmcorser Avatar answered Jan 13 '23 12:01

bmcorser