Add all
This commit is contained in:
parent
b35e18cd20
commit
82f55f7afe
80 changed files with 6687 additions and 5 deletions
30
priv/repo/migrations/20250702152953_create_relations.exs
Normal file
30
priv/repo/migrations/20250702152953_create_relations.exs
Normal file
|
@ -0,0 +1,30 @@
|
|||
defmodule Nulla.Repo.Migrations.CreateRelations do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:relations) do
|
||||
add :following, :boolean, default: false, null: false
|
||||
add :followed_by, :boolean, default: false, null: false
|
||||
add :showing_replies, :boolean, default: false, null: false
|
||||
add :showings_reblogs, :boolean, default: false, null: false
|
||||
add :notifying, :boolean, default: false, null: false
|
||||
add :muting, :boolean, default: false, null: false
|
||||
add :muting_notifications, :boolean, default: false, null: false
|
||||
add :blocking, :boolean, default: false, null: false
|
||||
add :blocked_by, :boolean, default: false, null: false
|
||||
add :domain_blocking, :boolean, default: false, null: false
|
||||
add :requested, :boolean, default: false, null: false
|
||||
add :note, :string
|
||||
|
||||
add :local_actor_id, references(:actors, type: :bigint), null: false
|
||||
add :remote_actor_id, references(:actors, type: :bigint), null: false
|
||||
|
||||
timestamps(type: :utc_datetime)
|
||||
end
|
||||
|
||||
create index(:relations, [:local_actor_id])
|
||||
create index(:relations, [:remote_actor_id])
|
||||
|
||||
create unique_index(:relations, [:local_actor_id, :remote_actor_id])
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue