Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lhm locking table during column length change #164

Open
gsingh0317 opened this issue Mar 13, 2023 · 0 comments
Open

Lhm locking table during column length change #164

gsingh0317 opened this issue Mar 13, 2023 · 0 comments

Comments

@gsingh0317
Copy link

gsingh0317 commented Mar 13, 2023

Using the below code on one of our bigger dummy tables, the migration process still locks the table itself and prevents access. Doing other operations such as add/remove column work without locking it, however trying to change the length of a column still locks it.

Lhm.change_table :shipments, :atomic_switch => true do |m|
  m.ddl("ALTER TABLE shipments MODIFY tracking_number VARCHAR(255) NOT NULL;")
end
Lhm.change_table :shipments, :atomic_switch => true do |m|
  m.change_column :tracking_number, "VARCHAR(255)"
end
@gsingh0317 gsingh0317 changed the title Lhm locling table during column length change Lhm locking table during column length change Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant