WIP notification settings
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -3,8 +3,8 @@ defmodule Mobilizon.Storage.Repo.Migrations.AddGroupNotificationAndLastNotificat
|
||||
|
||||
def change do
|
||||
alter table(:user_settings) do
|
||||
add(:group_notifications, :integer, default: 10, nullable: false)
|
||||
add(:last_notification_sent, :utc_datetime, nullable: true)
|
||||
add(:group_notifications, :integer, default: 10, null: false)
|
||||
add(:last_notification_sent, :utc_datetime, null: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
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
|
||||
@@ -0,0 +1,9 @@
|
||||
defmodule Mobilizon.Storage.Repo.Migrations.AddIsAnnouncementToComments do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:comments) do
|
||||
add(:is_announcement, :boolean, default: false, null: false)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
defmodule Mobilizon.Storage.Repo.Migrations.FixUserSettingsNullableFields do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:user_settings) do
|
||||
modify(:group_notifications, :integer, default: 10, null: false)
|
||||
modify(:last_notification_sent, :utc_datetime, null: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user