server/priv/repo/migrations/20231204141656_create_coach...

25 lines
553 B
Elixir
Raw Permalink Normal View History

2023-12-04 14:15:25 +00:00
defmodule BoardWise.Repo.Migrations.CreateCoaches do
use Ecto.Migration
@prefix "coach_scraper"
2023-12-04 14:15:25 +00:00
def change do
execute "CREATE SCHEMA coach_scraper"
2023-12-04 14:15:25 +00:00
create table(:export, prefix: @prefix) do
add :site, :string, null: false
add :username, :string, null: false
2023-12-04 14:15:25 +00:00
add :rapid, :integer
add :blitz, :integer
add :bullet, :integer
end
create unique_index(
:export,
[:site, :username],
prefix: @prefix,
name: "site_username_unique"
)
2023-12-04 14:15:25 +00:00
end
end