mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-26 17:59:26 +00:00
58bffc5c66
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
15 lines
451 B
Elixir
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
|