forked from potsda.mn/mobilizon
58bffc5c66
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
16 lines
451 B
Elixir
16 lines
451 B
Elixir
defmodule Mobilizon.Storage.Repo.Migrations.AddUserActivitySettings do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:user_activity_settings) do
|
|
add(:key, :string, nulla: false)
|
|
add(:method, :string, null: false)
|
|
add(:enabled, :boolean, null: false)
|
|
|
|
add(:user_id, references(:users, on_delete: :delete_all), null: false)
|
|
end
|
|
|
|
create(unique_index(:user_activity_settings, [:user_id, :key, :method]))
|
|
end
|
|
end
|