Fix issue when updating event and introduce background jobs

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-11-04 15:10:58 +01:00
parent fb25c7c07f
commit 95ba76a0fa
17 changed files with 193 additions and 39 deletions

View File

@@ -0,0 +1,7 @@
defmodule Mobilizon.Storage.Repo.Migrations.AddUniqueIndexOnActorAndEventForParticipant do
use Ecto.Migration
def change do
create(unique_index(:participants, [:event_id, :actor_id]))
end
end

View File

@@ -0,0 +1,13 @@
defmodule Mobilizon.Storage.Repo.Migrations.AddObanJobsTable do
use Ecto.Migration
def up do
Oban.Migrations.up()
end
# We specify `version: 1` in `down`, ensuring that we'll roll all the way back down if
# necessary, regardless of which version we've migrated `up` to.
def down do
Oban.Migrations.down(version: 1)
end
end