2019-01-23 10:37:25 -05:00
|
|
|
defmodule Pleroma.Repo.Migrations.CreateInstances do
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def change do
|
|
|
|
create table(:instances) do
|
|
|
|
add :host, :string
|
2019-03-20 09:16:29 -04:00
|
|
|
add :unreachable_since, :naive_datetime_usec
|
2019-01-23 10:37:25 -05:00
|
|
|
|
|
|
|
timestamps()
|
|
|
|
end
|
|
|
|
|
|
|
|
create unique_index(:instances, [:host])
|
|
|
|
create index(:instances, [:unreachable_since])
|
|
|
|
end
|
|
|
|
end
|