mirror of
https://github.com/plausible/analytics.git
synced 2024-12-25 02:24:55 +03:00
18 lines
428 B
Elixir
18 lines
428 B
Elixir
defmodule Plausible.Repo.Migrations.AddMonthlyStats do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:monthly_stats) do
|
|
add :month, :date, null: false
|
|
add :visitors, :integer, null: false
|
|
add :pageviews, :integer, null: false
|
|
add :site_id, references(:sites), null: false
|
|
|
|
timestamps()
|
|
end
|
|
|
|
create index(:monthly_stats, :site_id)
|
|
create index(:monthly_stats, :month)
|
|
end
|
|
end
|