2018-10-11 17:37:39 +02:00
|
|
|
defmodule Mobilizon.Repo.Migrations.Prerequites do
|
2018-01-13 23:33:03 +01:00
|
|
|
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
|