Remove address_type and rename phone to phone_address

An event can indeed have several address types

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-01-14 17:48:08 +01:00
parent b0bc8dfa5d
commit 289ba03960
17 changed files with 93 additions and 24 deletions

View File

@@ -0,0 +1,11 @@
defmodule Mobilizon.Repo.Migrations.RemoveAddressType do
use Ecto.Migration
def up do
alter table(:events) do
remove(:address_type)
end
execute "DROP TYPE address_type"
rename table(:events), :phone, to: :phone_address
end
end