1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-23 00:14:48 +00:00
mobilizon/priv/repo/migrations/20210526203337_add_user_activity_settings.exs
Thomas Citharel 58bffc5c66
WIP notification settings
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-06-04 13:33:25 +02:00

15 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