Skip to content

Possible unsafe migrations warning #462

Open
@dkuku

Description

@dkuku

I'm working through the book and I see that when a migration is generated for new index it's not applying concurrently: true

  def up do
    create unique_index(:albums, [:name, :artist_id],
             name: "albums_unique_album_names_per_artist_index"
           )
  end

This locks the table and with bigger databases can cause problems:
postgres docs
there are some libraries that will let you know about unsafe migrations where you can check what to avoid
rails - there is also one for elixir but as ash generates the migrations most of the stuff can be applied by changing the codegen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Someday

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions