analytics/priv/repo/migrations/20190127213938_add_tz_to_sites.exs

19 lines
342 B
Elixir
Raw Normal View History

2019-09-02 14:29:19 +03:00
defmodule Plausible.Repo.Migrations.AddTzToSites do
use Ecto.Migration
use Plausible.Repo
def change do
alter table(:sites) do
add :timezone, :string
end
flush()
Repo.update_all(Plausible.Site, [set: [timezone: "UTC"]])
alter table(:sites) do
modify :timezone, :string, null: false
end
end
end