Skip to content

Commit 85bc978

Browse files
authored
add trial_prospects table migration (#6508)
1 parent 2c7d1ec commit 85bc978

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
defmodule Plausible.Repo.Migrations.CreateTrialProspects do
2+
use Ecto.Migration
3+
4+
def change do
5+
create table(:trial_prospects) do
6+
add :team_id, references(:teams, on_delete: :delete_all), null: false
7+
add :estimated_monthly, :integer, null: false
8+
add :observed_days, :integer, null: false
9+
add :first_data_day, :date, null: false
10+
add :kind, :string, null: false
11+
12+
add :forced_by, {:array, :string}, null: false, default: []
13+
add :pageview_limit, :integer
14+
add :over_top_tier, :boolean, null: false, default: false
15+
add :estimated_mrr, :integer
16+
add :computed_at, :utc_datetime, null: false
17+
18+
timestamps()
19+
end
20+
21+
create unique_index(:trial_prospects, [:team_id])
22+
create index(:trial_prospects, [:estimated_mrr])
23+
end
24+
end

0 commit comments

Comments
 (0)