mirror of
https://github.com/plausible/analytics.git
synced 2024-12-25 02:24:55 +03:00
b35096bbc8
* Use Ecto.Schema for casting plans from JSON files * Dump plans to internal database table
22 lines
752 B
Elixir
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
|