affa7a007e
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.
13 lines
224 B
Elixir
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
|