defmodule SpazioSolazzo.Repo.Migrations.AddBookingIndexes do @moduledoc """ Updates resources based on their most recent snapshots. This file was autogenerated with `mix ash_postgres.generate_migrations` """ use Ecto.Migration def up do create index(:bookings, [:end_datetime]) create index(:bookings, [:start_datetime]) create index(:bookings, [:space_id, :state]) create index(:bookings, [:space_id, :start_datetime, :end_datetime]) end def down do drop_if_exists index(:bookings, [:space_id, :start_datetime, :end_datetime]) drop_if_exists index(:bookings, [:space_id, :state]) drop_if_exists index(:bookings, [:start_datetime]) drop_if_exists index(:bookings, [:end_datetime]) end end