mirror of
https://github.com/netfun2000/hipudding-teslamate.git
synced 2026-02-27 09:44:28 +08:00
12 lines
283 B
Elixir
12 lines
283 B
Elixir
defmodule TeslaMate.Repo.Migrations.AddRangeEnum do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
execute "CREATE TYPE range AS ENUM ('ideal', 'rated')", "DROP TYPE range"
|
|
|
|
alter table(:settings) do
|
|
add :preferred_range, :range, default: "rated", null: false
|
|
end
|
|
end
|
|
end
|