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