add fact processing status migrations
Some checks failed
ci / docker (push) Failing after 3m32s

This commit is contained in:
Álvaro 2024-06-22 13:05:18 +02:00
parent caf0e44f3e
commit 2768e4434a
2 changed files with 24 additions and 7 deletions

View File

@ -16,13 +16,6 @@ defmodule LoLAnalytics.Repo.Migrations.AnalyticsTables do
create index("dim_item", [:item_id], unique: true)
create table("dim_match") do
add :match_id, :string, primary_key: true, null: false
timestamps()
end
create index("dim_match", [:match_id], unique: true)
create table("dim_patch") do
add :patch_number, :string, primary_key: true, null: false
timestamps()
@ -30,6 +23,15 @@ defmodule LoLAnalytics.Repo.Migrations.AnalyticsTables do
create index("dim_patch", [:patch_number], unique: true)
create table("dim_match") do
add :patch_number, references("dim_patch", column: :patch_number, type: :string)
add :match_id, :string, primary_key: true, null: false
timestamps()
end
create index("dim_match", [:patch_number])
create index("dim_match", [:match_id], unique: true)
create table("dim_player") do
add :puuid, :string, primary_key: true, null: false
timestamps()

View File

@ -0,0 +1,15 @@
defmodule LoLAnalytics.Repo.Migrations.DimMatchFactProcessingStatus do
use Ecto.Migration
def change do
alter table("dim_match") do
add :fact_champion_played_game_status, :integer
add :fact_champion_picked_item_status, :integer
add :fact_champion_picked_summoner_spell_status, :integer
end
create index("dim_match", [:fact_champion_played_game_status])
create index("dim_match", [:fact_champion_picked_item_status])
create index("dim_match", [:fact_champion_picked_summoner_spell_status])
end
end