summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20250323093713_create_locations.exs
blob: 937302438d314088b914807f7aa62d31fd519ab1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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