Files
music_library/priv/repo/migrations/20240915181757_embed_artists.exs
Claudio Ortolina affa7a007e Simplify data model
Artists can be embedded inside records - given the projected size of the
dataset (a few 1000s in the worst case) relationships can be built in
memory without the need to be denormalized into separate tables.
2024-09-15 20:29:52 +01:00

13 lines
224 B
Elixir

defmodule MusicLibrary.Repo.Migrations.EmbedArtists do
use Ecto.Migration
def change do
drop table(:artists_records)
drop table(:artists)
alter table(:records) do
add :artists, :map
end
end
end