79267845

Date: 2024-12-10 10:21:17
Score: 1
Natty:
Report link

You can pass the parameter recreate="always" to the method batch_alter_column so that a new table is created and the old one is deleted. This way, you won't have problems with prior constraints. This can be helpful with the migrations of not so big tables (as otherwise the performance would be bad). Check Alembic's docs here.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: José Martinho