2023-02-15 18:31:23 +00:00
|
|
|
defmodule Mobilizon.Repo.Migrations.CreateApplications do
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def change do
|
|
|
|
create table(:applications) do
|
|
|
|
add(:name, :string, null: false)
|
|
|
|
add(:client_id, :string, null: false)
|
|
|
|
add(:client_secret, :string, null: false)
|
2023-03-17 17:10:59 +00:00
|
|
|
add(:redirect_uris, {:array, :string}, null: false)
|
|
|
|
add(:scope, :string, null: true)
|
2023-02-15 18:31:23 +00:00
|
|
|
add(:website, :string, null: true)
|
|
|
|
add(:owner_type, :string, null: true)
|
|
|
|
add(:owner_id, :integer, null: true)
|
|
|
|
|
|
|
|
timestamps()
|
|
|
|
end
|
|
|
|
|
|
|
|
create(index(:applications, [:owner_id, :owner_type]))
|
|
|
|
end
|
|
|
|
end
|