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

28 lines
785 B
Elixir
Raw Normal View History

2024-08-24 09:09:21 +00:00
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
2024-08-24 16:54:30 +00:00
# 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])
2024-08-24 09:09:21 +00:00
end
end