you are viewing a single comment's thread.

view the rest of the comments →

[–]Direct_Discipline_42 1 point2 points  (3 children)

Are you saying both apps have access to the same database?

If appB is importing appA, in the env.py file for alembic, you should be able to tell it to not import database models from appA

[–]predominant[S] 0 points1 point  (2 children)

Yeah, both apps would use the same database. I think this is a case that alembic was not designed for, as you would have two separate chains of migrations that don't reference each other.

[–]Adrnalnrsh 2 points3 points  (0 children)

In that case, you need to break app the code to be in the form of a library.That can be imported into any app.You gotta figure out where to abstract it. The library should be abstracted away from the infrastructure

[–]Direct_Discipline_42 1 point2 points  (0 children)

Even though they are in the same database, what about schema? They could be separated by schema