From 61a2b1a7208c908b449e40a83aa242a40ff8667f Mon Sep 17 00:00:00 2001 From: Florian Lentsch Date: Sat, 13 Jul 2024 18:16:58 +0200 Subject: [PATCH] Workaround for #78 --- .../20240316190957_alter_articles_add_more_unit_logic.rb | 6 +++--- db/schema.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/db/migrate/20240316190957_alter_articles_add_more_unit_logic.rb b/db/migrate/20240316190957_alter_articles_add_more_unit_logic.rb index 66cf318b..c60c2350 100644 --- a/db/migrate/20240316190957_alter_articles_add_more_unit_logic.rb +++ b/db/migrate/20240316190957_alter_articles_add_more_unit_logic.rb @@ -50,9 +50,9 @@ def up change_table :order_articles do |t| t.change :quantity, :decimal, precision: 8, scale: 3, null: false, comment: 'stored in `article_versions.group_order_unit`' t.change :tolerance, :decimal, precision: 8, scale: 3, null: false, comment: 'stored in `article_versions.group_order_unit`' - t.change :units_to_order, :decimal, precision: 8, scale: 3, null: false, comment: 'stored in `article_versions.supplier_order_unit`' - t.change :units_billed, :decimal, precision: 8, scale: 3, null: true, comment: 'stored in `article_versions.supplier_order_unit`' - t.change :units_received, :decimal, precision: 8, scale: 3, null: true, comment: 'stored in `article_versions.supplier_order_unit`' + t.change :units_to_order, :decimal, precision: 11, scale: 6, null: false, comment: 'stored in `article_versions.supplier_order_unit`' + t.change :units_billed, :decimal, precision: 11, scale: 6, null: true, comment: 'stored in `article_versions.supplier_order_unit`' + t.change :units_received, :decimal, precision: 11, scale: 6, null: true, comment: 'stored in `article_versions.supplier_order_unit`' end change_table :group_order_articles do |t| diff --git a/db/schema.rb b/db/schema.rb index 41eaaf75..0a27024e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -364,11 +364,11 @@ t.integer "order_id", default: 0, null: false t.decimal "quantity", precision: 8, scale: 3, default: "0.0", null: false, comment: "stored in `article_versions.group_order_unit`" t.decimal "tolerance", precision: 8, scale: 3, default: "0.0", null: false, comment: "stored in `article_versions.group_order_unit`" - t.decimal "units_to_order", precision: 8, scale: 3, default: "0.0", null: false, comment: "stored in `article_versions.supplier_order_unit`" + t.decimal "units_to_order", precision: 11, scale: 6, default: "0.0", null: false, comment: "stored in `article_versions.supplier_order_unit`" t.integer "lock_version", default: 0, null: false t.integer "article_version_id", null: false - t.decimal "units_billed", precision: 8, scale: 3, comment: "stored in `article_versions.supplier_order_unit`" - t.decimal "units_received", precision: 8, scale: 3, comment: "stored in `article_versions.supplier_order_unit`" + t.decimal "units_billed", precision: 11, scale: 6, comment: "stored in `article_versions.supplier_order_unit`" + t.decimal "units_received", precision: 11, scale: 6, comment: "stored in `article_versions.supplier_order_unit`" t.index ["article_version_id"], name: "index_order_articles_on_article_version_id" t.index ["order_id", "article_version_id"], name: "index_order_articles_on_order_id_and_article_version_id", unique: true t.index ["order_id"], name: "index_order_articles_on_order_id"