I would like to enforce that my migration doesn't lock a table.
In plain SQL I would use ALTER ONLINE TABLE ...
or ALTER TABLE x ADD COLUMN (...), LOCK=NONE
.
I can't find a way to replicate this with alembic using op.add_column
.
I would like to enforce that my migration doesn't lock a table.
In plain SQL I would use ALTER ONLINE TABLE ...
or ALTER TABLE x ADD COLUMN (...), LOCK=NONE
.
I can't find a way to replicate this with alembic using op.add_column
.
First note ADD COLUMN cannot be LOCK=NONE for Auto-increment.
SET SESSION alter_algorithm='INSTANT';
Might be a workable alternative. Ensure you have a MariaDB-10.6.9+ version per docs.