From ed7ad5626610bd41eaf9a363d51fc75d2c89cb95 Mon Sep 17 00:00:00 2001 From: Peter de Croos Date: Wed, 8 Jul 2020 18:38:20 +0300 Subject: [PATCH] phoenix-migrations: changed precision to apply to decimal (#1375) adding `precision: 10, scale: 2` will result in an exception on migration due to malformed sql. precision and scale apply to decimal --- phoenix-migrations.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phoenix-migrations.md b/phoenix-migrations.md index 3b4d5394..21e32708 100644 --- a/phoenix-migrations.md +++ b/phoenix-migrations.md @@ -49,7 +49,8 @@ create table(:documents) do add :body, :text add :age, :integer add :price, :float - add :price, :float, precision: 10, scale: 2 + add :price, :float + add :price, :decimal, precision: 10, scale: 2 add :published_at, :utc_datetime add :group_id, references(:groups) add :object, :json