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