analytics/priv/repo/migrations/20190906111810_add_email_reporting.exs
2019-09-02 13:11:37 +01:00

20 lines
463 B
Elixir

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