update db: make puuid unique, add status column

This commit is contained in:
2024-05-05 02:33:00 +02:00
parent dde4e3bf90
commit 367d751af0
4 changed files with 20 additions and 3 deletions
@@ -3,7 +3,7 @@ defmodule LoLAnalytics.Repo.Migrations.Player do
def change do
create table("player") do
add :puuid, :string
add :puuid, :string, primary_key: true
add :region, :string
add :last_processed_at, :utc_datetime
timestamps()
@@ -0,0 +1,13 @@
defmodule LoLAnalytics.Repo.Migrations.MatchAndPlayerStatus do
use Ecto.Migration
def change do
alter table("match") do
add :status, :string, default: "processed"
end
alter table("player") do
add :status, :string, default: "processed"
end
end
end