Introduce relay

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-07-30 16:40:59 +02:00
parent 56467301a1
commit c51115bdbe
54 changed files with 3100 additions and 1038 deletions

View File

@@ -0,0 +1,21 @@
defmodule Mobilizon.Repo.Migrations.AddUrlToFollowsAndMoveToUuid do
use Ecto.Migration
def up do
alter table(:followers, primary_key: false) do
remove(:score)
remove(:id)
add(:id, :uuid, primary_key: true)
add(:url, :string, null: false)
end
end
def down do
alter table(:followers, primary_key: true) do
add(:score, :integer, default: 1000)
remove(:id)
add(:id, :serial, primary_key: true)
remove(:url)
end
end
end