index.community/backend/priv/repo/migrations/20190710133755_create_edges.exs

18 lines
468 B
Elixir
Raw Normal View History

2019-07-14 11:47:06 +00:00
defmodule Backend.Repo.Migrations.CreateEdges do
use Ecto.Migration
def change do
create table(:edges) do
add :source_domain, references(:instances, column: :domain, type: :string), null: false
add :target_domain, references(:instances, column: :domain, type: :string), null: false
add :weight, :float, null: false
2019-07-14 11:47:06 +00:00
timestamps()
end
create index(:edges, [:source_domain])
create index(:edges, [:target_domain])
end
end