2018-01-13 23:33:03 +01:00
|
|
|
defmodule Eventos.Repo.Migrations.Prerequites do
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def up do
|
2018-07-25 16:42:04 +02:00
|
|
|
execute("""
|
2018-01-13 23:33:03 +01:00
|
|
|
CREATE TYPE datetimetz AS (
|
|
|
|
dt timestamptz,
|
|
|
|
tz varchar
|
|
|
|
);
|
2018-07-25 16:42:04 +02:00
|
|
|
""")
|
|
|
|
|
|
|
|
execute("CREATE EXTENSION IF NOT EXISTS postgis")
|
2018-01-13 23:33:03 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
def down do
|
2018-07-25 16:42:04 +02:00
|
|
|
execute("DROP TYPE IF EXISTS datetimetz;")
|
|
|
|
execute("DROP EXTENSION IF EXISTS postgis")
|
2018-01-13 23:33:03 +01:00
|
|
|
end
|
|
|
|
end
|