defmodule Silmataivas.Repo.Migrations.CreateLocations do use Ecto.Migration def change do create table(:locations) do add :latitude, :float add :longitude, :float add :user_id, references(:users, on_delete: :nothing) timestamps(type: :utc_datetime) end create index(:locations, [:user_id]) end end