Created
July 8, 2017 14:16
-
-
Save shankardevy/56a1b7915522401f40e2e77890c0ea97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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