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:
11
priv/repo/migrations/20190114162055_remove_address_type.exs
Normal file
11
priv/repo/migrations/20190114162055_remove_address_type.exs
Normal 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
|
||||
Reference in New Issue
Block a user