Page MenuHomePhorge

20190315101315_create_registrations.exs
No OneTemporary

Size
731 B
Referenced Files
None
Subscribers
None

20190315101315_create_registrations.exs

# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Repo.Migrations.CreateRegistrations do
use Ecto.Migration
def change do
create_if_not_exists 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_if_not_exists(unique_index(:registrations, [:provider, :uid]))
create_if_not_exists(unique_index(:registrations, [:user_id, :provider, :uid]))
end
end

File Metadata

Mime Type
text/x-ruby
Expires
Sun, Feb 15, 4:38 AM (15 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1031248
Default Alt Text
20190315101315_create_registrations.exs (731 B)

Event Timeline