Skip to content

Commit

Permalink
Merge pull request #2 from joshleecreates/ffs-float-fix
Browse files Browse the repository at this point in the history
return to single migration with decimal type
  • Loading branch information
puckpuck authored Dec 12, 2023
2 parents 4e6b326 + 125ad35 commit 2abc9ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0


defmodule Featureflagservice.FeatureFlags.FeatureFlag do
use Ecto.Schema
import Ecto.Changeset

schema "featureflags" do
field :description, :string
field :enabled, :float, default: 0.0
field :enabled, :decimal, default: 0.0
field :name, :string

timestamps()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Featureflagservice.Repo.Migrations.CreateFeatureflags do
create table(:featureflags) do
add :name, :string
add :description, :string
add :enabled, :boolean, default: false, null: false
add :enabled, :decimal, default: 0.0, null: false

timestamps()
end
Expand All @@ -19,25 +19,25 @@ defmodule Featureflagservice.Repo.Migrations.CreateFeatureflags do
repo().insert(%Featureflagservice.FeatureFlags.FeatureFlag{
name: "productCatalogFailure",
description: "Fail product catalog service on a specific product",
enabled: false
enabled: 0.0
})

repo().insert(%Featureflagservice.FeatureFlags.FeatureFlag{
name: "recommendationCache",
description: "Cache recommendations",
enabled: false
enabled: 0.0
})

repo().insert(%Featureflagservice.FeatureFlags.FeatureFlag{
name: "adServiceFailure",
description: "Fail ad service requests sporadically",
enabled: false
enabled: 0.0
})

repo().insert(%Featureflagservice.FeatureFlags.FeatureFlag{
name: "cartServiceFailure",
description: "Fail cart service requests sporadically",
enabled: false
enabled: 0.0
})
end

Expand Down

This file was deleted.

0 comments on commit 2abc9ed

Please sign in to comment.