improve indexes

This commit is contained in:
shibao 2022-11-19 13:14:45 -05:00
parent d389515f76
commit 5cae646758
2 changed files with 17 additions and 0 deletions

View File

@ -1,6 +1,7 @@
# v0.7.1 # v0.7.1
- Fix table component alignment and styling - Fix table component alignment and styling
- Fix toggle button styling - Fix toggle button styling
- Miscellanous code improvements
# v0.7.1 # v0.7.1
- Add shading to table component - Add shading to table component

View File

@ -0,0 +1,16 @@
defmodule Cannery.Repo.Migrations.AddMoreIndexes do
use Ecto.Migration
def change do
create unique_index(:container_tags, [:tag_id, :container_id])
create index(:ammo_groups, [:user_id], where: "count = 0", name: :empty_ammo_groups_index)
create index(:ammo_groups, [:user_id, :ammo_type_id])
create index(:ammo_groups, [:user_id, :container_id])
create index(:ammo_types, [:user_id])
drop index(:shot_groups, [:id])
create index(:shot_groups, [:user_id, :ammo_group_id])
end
end