1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-24 17:01:45 +00:00
mobilizon/priv/repo/migrations/20190322143724_rename_address_fields.exs
Thomas Citharel 0c8d2f7e00
Work around Addresses to bring them properly through GraphQL
Got caught with https://github.com/absinthe-graphql/absinthe/issues/601
at some point, that's why fields are renamed

Fix tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-04-01 16:51:15 +02:00

11 lines
410 B
Elixir

defmodule Mobilizon.Repo.Migrations.RenameAddressFields do
use Ecto.Migration
def change do
rename(table(:addresses), :addressCountry, to: :country)
rename(table(:addresses), :addressLocality, to: :locality)
rename(table(:addresses), :addressRegion, to: :region)
rename(table(:addresses), :postalCode, to: :postal_code)
rename(table(:addresses), :streetAddress, to: :street)
end
end