vonbraun/priv/repo/migrations/20240824085128_initial.exs

28 lines
785 B
Elixir

defmodule Vonbraun.Repo.Migrations.Initial do
use Ecto.Migration
def change do
create table(:pairs, primary_key: false) do
add(:key, :string, primary_key: true)
add(:value, :string)
timestamps()
end
# Only put state in here not AP data
create table(:actors, primary_key: false) do
add(:id, :string, primary_key: true)
add(:muted, :boolean)
add(:blocked, :naive_datetime)
add(:follows_me_state, :string)
add(:follows_me_ts, :naive_datetime)
add(:following_state, :string)
add(:following_ts, :naive_datetime)
timestamps()
end
create index(:actors, :muted)
create index(:actors, [:follows_me_state, :follows_me_ts])
create index(:actors, [:following_state, :following_ts])
end
end