Replies: 3 comments 10 replies
-
I dont have any fixed method of doing data migrations with alembic, this is something that people need to come up with depending on their project's requirements. I don't have the content to produce such a section so in this discussion if folks want to capture things that are safe to document (that is, won't mislead people into a poor / rigid architecture for which they blame us and post more bugs) we can maybe figure something out. |
Beta Was this translation helpful? Give feedback.
-
I recently come around this issue when I needed to change the column type on a large table. I come out with the following workflow:
Based on @zzzeek's comment above I guess that's an expected approach. Would it be possible to add at least this suggestion into the docs? It takes really some time to find this is actually expected solution. |
Beta Was this translation helpful? Give feedback.
-
How can I apply these migrations when I have the bash file that
#! /usr/bin/env bash
# Let the DB start
#python3 app/pre_start.py
# Run migrations
alembic upgrade head
# run the server
python3 app/server.py
|
Beta Was this translation helpful? Give feedback.
-
Describe the use case
It is hard to discover how to insert data in Alembic migrations. This is partially described in https://alembic.sqlalchemy.org/en/latest/ops.html?highlight=bulk_insert#alembic.operations.Operations.bulk_insert with an example of newly created table, but doesn't cover things more.
Additional context
#970
Have a nice day!
Beta Was this translation helpful? Give feedback.
All reactions