Skip to content

Lhm locking table during column length change #164

@gsingh0317

Description

@gsingh0317

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions