Skip to content

Instantly share code, notes, and snippets.

@shankardevy
Created July 8, 2017 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shankardevy/56a1b7915522401f40e2e77890c0ea97 to your computer and use it in GitHub Desktop.
Save shankardevy/56a1b7915522401f40e2e77890c0ea97 to your computer and use it in GitHub Desktop.
defmodule Mango.Repo.Migrations.AddCheckoutFieldsToOrders do
use Ecto.Migration
def change do
alter table(:orders) do
add :comments, :text
add :customer_id, references(:customers)
add :customer_name, :string
add :email, :string
add :residence_area, :string
end
create index(:orders, [:customer_id])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment