defmodule MyApp.Repo.Migrations.AddColumnsToPosts do use Ecto.Migration
def change do alter table(:posts) do
add :author_id, :integer, first: true # add column in front of all the columns
add :body, :text, after: :title # add column after `title` end endend--
You received this message because you are subscribed to the Google Groups "elixir-ecto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-ecto...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-ecto/59d4b15a-aba9-4e1e-a49e-676a027163b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.