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
This commit is contained in:
Peter de Croos 2020-07-08 18:38:20 +03:00 committed by GitHub
parent 11849e8464
commit ed7ad56266
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,8 @@ create table(:documents) do
add :body, :text add :body, :text
add :age, :integer add :age, :integer
add :price, :float 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 :published_at, :utc_datetime
add :group_id, references(:groups) add :group_id, references(:groups)
add :object, :json add :object, :json