You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
There are some extra considerations with concurrent index creation, because it can't be done in a transaction. We have tools for it with custom indexes and we could potentially do it by default or allow the default to be configured for identities.
Yeah, I think we could do it by default for identities on tables that we didn't just create, and shuffle them into their own separate migration with the transaction disabled like we do for concurrent custom indexes. PRs welcome!
I'm working through the book and I see that when a migration is generated for new index it's not applying
concurrently: true
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.
The text was updated successfully, but these errors were encountered: