I have a schema that contains an embedded schema, which I would like to rename a field on. For example:
schema "menu_items" do field(:plu, :string) # ... embeds_many :build_items, BuildItem, on_replace: :delete do field(:item_id, :string) # ... end end
I want to rename the
item_id field to
value. Is there a way to do this with an Ecto migration or will I need to create the new field, copy the data over, then delete the old field?
Any pointers are very much appreciated.