analytics/priv/repo/migrations/20190906111810_add_email_reporting.exs

20 lines
463 B
Elixir
Raw Normal View History

2019-09-05 19:11:07 +03:00
defmodule Plausible.Repo.Migrations.AddEmailReporting do
use Ecto.Migration
def change do
create table(:email_settings) do
add :site_id, references(:sites, on_delete: :delete_all), null: false
timestamps()
end
create table(:sent_email_reports) do
add :site_id, references(:sites, on_delete: :delete_all), null: false
add :year, :integer
add :week, :integer
add :timestamp, :naive_datetime
end
end
end