farmbot_os/farmbot_core/priv/config/migrations/20180416165217_add_beta_sta...

22 lines
603 B
Elixir
Raw Normal View History

2019-03-05 11:09:15 -07:00
defmodule FarmbotCore.Config.Repo.Migrations.AddBetaState do
use Ecto.Migration
2019-03-05 11:09:15 -07:00
import FarmbotCore.Config.MigrationHelpers
2018-05-10 17:37:17 -06:00
2020-01-17 08:58:53 -07:00
@default_currently_on_beta Application.get_env(
:farmbot_core,
FarmbotCore.EctoMigrator
)[:default_currently_on_beta]
2018-11-30 13:40:57 -07:00
2018-10-29 16:27:01 -06:00
if is_nil(@default_currently_on_beta),
2020-01-17 08:58:53 -07:00
do:
Mix.raise("Missing application env config: `:default_currently_on_beta`")
def change do
2020-01-17 08:58:53 -07:00
create_settings_config(
"currently_on_beta",
:bool,
@default_currently_on_beta
)
end
end