analytics/priv/repo/migrations/20231121131602_create_plans_table.exs
Vinicius Brasil b35096bbc8
Dump plan information to PostgreSQL (#3543)
* Use Ecto.Schema for casting plans from JSON files

* Dump plans to internal database table
2023-11-21 11:25:54 -03:00

22 lines
752 B
Elixir

defmodule Plausible.Repo.Migrations.CreatePlansTable do
use Ecto.Migration
def change do
if !Application.get_env(:plausible, :is_selfhost) do
create table(:plans) do
add :generation, :integer, null: false
add :kind, :string, null: false
add :features, {:array, :string}, null: false
add :monthly_pageview_limit, :integer, null: false
add :site_limit, :integer, null: false
add :team_member_limit, :integer, null: false
add :volume, :string, null: false
add :monthly_cost, :decimal, null: true
add :monthly_product_id, :string, null: true
add :yearly_cost, :decimal, null: true
add :yearly_product_id, :string, null: true
end
end
end
end