mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-23 00:14:48 +00:00
cc820d6b63
* Data doesn't need anymore to be converted to ActivityStream format to be saved (this was taken from Pleroma and not at all a good idea here) * Everything saved when creating an event is inserted into PostgreSQL in a single transaction
16 lines
511 B
Elixir
16 lines
511 B
Elixir
defmodule Mobilizon.Storage.Repo.Migrations.AddMentionTables do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:mentions) do
|
|
add(:silent, :boolean, default: false, null: false)
|
|
add(:actor_id, references(:actors, on_delete: :delete_all), null: false)
|
|
add(:event_id, references(:events, on_delete: :delete_all), null: true)
|
|
add(:comment_id, references(:comments, on_delete: :delete_all), null: true)
|
|
|
|
timestamps()
|
|
end
|
|
|
|
create(index(:mentions, [:actor_id]))
|
|
end
|
|
end
|