diff --git a/priv/repo/migrations/20230417225712_composite_index_to_position.exs b/priv/repo/migrations/20230417225712_composite_index_to_position.exs new file mode 100644 index 0000000000..f3d5958024 --- /dev/null +++ b/priv/repo/migrations/20230417225712_composite_index_to_position.exs @@ -0,0 +1,8 @@ +defmodule TeslaMate.Repo.Migrations.AddCompositeIndexToPositions do + use Ecto.Migration + + def change do + create index(:positions, [:drive_id, :date]) + drop index(:positions, [:drive_id]) + end +end \ No newline at end of file