mirror of
https://github.com/plausible/analytics.git
synced 2024-12-02 07:38:47 +03:00
16 lines
317 B
Elixir
16 lines
317 B
Elixir
defmodule Plausible.Repo.Migrations.AddSessionStart do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
alter table(:sessions) do
|
|
add :start, :naive_datetime
|
|
end
|
|
|
|
execute "UPDATE sessions set start = timestamp"
|
|
|
|
alter table(:sessions) do
|
|
modify :start, :naive_datetime, null: false
|
|
end
|
|
end
|
|
end
|