Merge remote-tracking branch 'pleroma/develop' into feature/disable-account
This commit is contained in:
commit
0f2f7d2cec
824 changed files with 14025 additions and 2958 deletions
|
|
@ -5,7 +5,7 @@ defmodule Pleroma.Repo.Migrations.CreateWebsubClientSubscription do
|
|||
create table(:websub_client_subscriptions) do
|
||||
add :topic, :string
|
||||
add :secret, :string
|
||||
add :valid_until, :naive_datetime
|
||||
add :valid_until, :naive_datetime_usec
|
||||
add :state, :string
|
||||
add :subscribers, :map
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ defmodule Pleroma.Repo.Migrations.CreateOAuthAuthorizations do
|
|||
add :app_id, references(:apps)
|
||||
add :user_id, references(:users)
|
||||
add :token, :string
|
||||
add :valid_until, :naive_datetime
|
||||
add :valid_until, :naive_datetime_usec
|
||||
add :used, :boolean, default: false
|
||||
|
||||
timestamps()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Repo.Migrations.CreateOAuthToken do
|
|||
add :user_id, references(:users)
|
||||
add :token, :string
|
||||
add :refresh_token, :string
|
||||
add :valid_until, :naive_datetime
|
||||
add :valid_until, :naive_datetime_usec
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ defmodule Pleroma.Repo.Migrations.CreateFilters do
|
|||
add :hide, :boolean
|
||||
add :phrase, :string
|
||||
add :context, {:array, :string}
|
||||
add :expires_at, :datetime
|
||||
add :expires_at, :utc_datetime
|
||||
add :whole_word, :boolean
|
||||
|
||||
timestamps()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ defmodule Pleroma.Repo.Migrations.UsersAddLastRefreshedAt do
|
|||
|
||||
def change do
|
||||
alter table(:users) do
|
||||
add :last_refreshed_at, :naive_datetime
|
||||
add :last_refreshed_at, :naive_datetime_usec
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ defmodule Pleroma.Repo.Migrations.CreateInstances do
|
|||
def change do
|
||||
create table(:instances) do
|
||||
add :host, :string
|
||||
add :unreachable_since, :naive_datetime
|
||||
add :unreachable_since, :naive_datetime_usec
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
|
|
|||
18
priv/repo/migrations/20190315101315_create_registrations.exs
Normal file
18
priv/repo/migrations/20190315101315_create_registrations.exs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
defmodule Pleroma.Repo.Migrations.CreateRegistrations do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:registrations, primary_key: false) do
|
||||
add :id, :uuid, primary_key: true
|
||||
add :user_id, references(:users, type: :uuid, on_delete: :delete_all)
|
||||
add :provider, :string
|
||||
add :uid, :string
|
||||
add :info, :map, default: %{}
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
create unique_index(:registrations, [:provider, :uid])
|
||||
create unique_index(:registrations, [:user_id, :provider, :uid])
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
defmodule Pleroma.Repo.Migrations.CreateNotificationIdIndex do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create index(:notifications, ["id desc nulls last"])
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
defmodule Pleroma.Repo.Migrations.CreateScheduledActivities do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:scheduled_activities) do
|
||||
add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
|
||||
add(:scheduled_at, :naive_datetime, null: false)
|
||||
add(:params, :map, null: false)
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
create(index(:scheduled_activities, [:scheduled_at]))
|
||||
create(index(:scheduled_activities, [:user_id]))
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddOauthTokenIndexes do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create(unique_index(:oauth_tokens, [:token]))
|
||||
create(index(:oauth_tokens, [:app_id]))
|
||||
create(index(:oauth_tokens, [:user_id]))
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddFieldsToUserInviteTokens do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:user_invite_tokens) do
|
||||
add(:expires_at, :date)
|
||||
add(:uses, :integer, default: 0)
|
||||
add(:max_use, :integer)
|
||||
add(:invite_type, :string, default: "one_time")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddIndexOnSubscribers do
|
||||
use Ecto.Migration
|
||||
|
||||
@disable_ddl_transaction true
|
||||
def change do
|
||||
create index(:users, ["(info->'subscribers')"], name: :users_subscribers_index, using: :gin, concurrently: true)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue