I would like to go from this:
schema "products" do
field :name, :string
field :brand, :string
...more fields...
end
To this:
schema "products" do
field :name, :string
...more fields...
end
schema "brands" do
field :name, :string
...more fields...
end
schema "product_brand_joins" do
field :p_id, :integer
field :b_id, :integer
...more fields...
end
Without losing my current data which has products with a string :brand field.
I understand how to create the new brands table and product_brand_joins tables and remove ":brand" from products table, with an ecto migration. But is there a way to manipulate my current data into the new tables?