Closed pmyjavec closed 7 years ago
I should mention I'm using something like this, which I'm personally very happy with:
defmodule ShadyCorner.Repo.Migrations.CatTz do
use Ecto.Migration
def change do
execute """
CREATE TYPE datetimetz AS (
dt timestamptz,
tz varchar
);
"""
alter table(:catdog) do
add :birth_tz, :datetimetz
end
end
end
@pmyjavec That's exactly how I would do it :)
I'm curious what a migration should look to set up my database (psql) for use with
Timex.Ecto.DateTimeWithTimezone
, there has been some commentary on this issue (https://github.com/bitwalker/timex/issues/133) about it and I've used something similar.Is there a better way to do this?