debianize-mobilizon/priv/repo/migrations/20200218170232_move_member_id_to_uuid.exs
Thomas Citharel 4144e9ffd0
Introduce group basic federation, event new page and notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-06-03 16:01:26 +02:00

22 lines
472 B
Elixir

defmodule Mobilizon.Storage.Repo.Migrations.MoveMemberIdToUuid do
use Ecto.Migration
def up do
alter table(:members, primary_key: false) do
remove(:id)
add(:id, :uuid, primary_key: true)
add(:url, :string, null: false)
add(:metadata, :map)
end
end
def down do
alter table(:members, primary_key: true) do
remove(:id)
remove(:url)
remove(:metadata)
add(:id, :serial, primary_key: true)
end
end
end