[#1304] Moved all non-mutes / non-blocks fields from User.Info to User. WIP.
This commit is contained in:
parent
e3b4a3e96b
commit
10ff01acd9
88 changed files with 1069 additions and 1170 deletions
|
|
@ -5,7 +5,11 @@ defmodule Pleroma.Repo.Migrations.AddFollowingAddressFromSourceData do
|
|||
|
||||
def change do
|
||||
query =
|
||||
User.external_users_query()
|
||||
User.Query.build(%{
|
||||
external: true,
|
||||
legacy_active: true,
|
||||
order_by: :id
|
||||
})
|
||||
|> select([u], struct(u, [:id, :ap_id, :info]))
|
||||
|
||||
Pleroma.Repo.stream(query)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
defmodule Pleroma.Repo.Migrations.CopyMutedToMutedNotifications do
|
||||
use Ecto.Migration
|
||||
alias Pleroma.User
|
||||
|
||||
def change do
|
||||
execute(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
defmodule Pleroma.Repo.Migrations.CopyUsersInfoaddsToUsers do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:users) do
|
||||
add(:banner, :map, default: %{})
|
||||
add(:background, :map, default: %{})
|
||||
add(:source_data, :map, default: %{})
|
||||
add(:note_count, :integer, default: 0)
|
||||
add(:follower_count, :integer, default: 0)
|
||||
# Should be filled in only for remote users
|
||||
add(:following_count, :integer, default: nil)
|
||||
add(:locked, :boolean, default: false)
|
||||
add(:confirmation_pending, :boolean, default: false)
|
||||
add(:password_reset_pending, :boolean, default: false)
|
||||
add(:confirmation_token, :text, default: nil)
|
||||
add(:default_scope, :string, default: "public")
|
||||
add(:blocks, {:array, :text}, default: [])
|
||||
add(:domain_blocks, {:array, :text}, default: [])
|
||||
add(:mutes, {:array, :text}, default: [])
|
||||
add(:muted_reblogs, {:array, :text}, default: [])
|
||||
add(:muted_notifications, {:array, :text}, default: [])
|
||||
add(:subscribers, {:array, :text}, default: [])
|
||||
add(:deactivated, :boolean, default: false, null: false)
|
||||
add(:no_rich_text, :boolean, default: false, null: false)
|
||||
add(:ap_enabled, :boolean, default: false, null: false)
|
||||
add(:is_moderator, :boolean, default: false, null: false)
|
||||
add(:is_admin, :boolean, default: false, null: false)
|
||||
add(:show_role, :boolean, default: true, null: false)
|
||||
add(:settings, :map, default: nil)
|
||||
add(:magic_key, :text, default: nil)
|
||||
add(:uri, :text, default: nil)
|
||||
add(:topic, :text, default: nil)
|
||||
add(:hub, :text, default: nil)
|
||||
add(:salmon, :text, default: nil)
|
||||
add(:hide_followers_count, :boolean, default: false, null: false)
|
||||
add(:hide_follows_count, :boolean, default: false, null: false)
|
||||
add(:hide_followers, :boolean, default: false, null: false)
|
||||
add(:hide_follows, :boolean, default: false, null: false)
|
||||
add(:hide_favorites, :boolean, default: true, null: false)
|
||||
add(:unread_conversation_count, :integer, default: 0)
|
||||
add(:pinned_activities, {:array, :text}, default: [])
|
||||
add(:email_notifications, :map, default: %{"digest" => false})
|
||||
add(:mascot, :map, default: nil)
|
||||
add(:emoji, {:array, :map}, default: [])
|
||||
add(:pleroma_settings_store, :map, default: %{})
|
||||
add(:fields, {:array, :map}, default: nil)
|
||||
add(:raw_fields, {:array, :map}, default: [])
|
||||
add(:discoverable, :boolean, default: false, null: false)
|
||||
add(:notification_settings, :map, default: %{})
|
||||
add(:skip_thread_containment, :boolean, default: false, null: false)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue