1
1
mirror of https://github.com/plausible/analytics.git synced 2024-12-20 16:11:49 +03:00
analytics/priv/repo/migrations/20190127213938_add_tz_to_sites.exs
2019-09-02 12:29:19 +01:00

19 lines
342 B
Elixir

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