From 5a9e7eac990a59bc400bfb18e5041943a7cf8ca9 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Mon, 17 Jul 2023 13:06:03 -0500 Subject: [PATCH] revert session time back to float originally turned to decimal for precision, but decimals and precision are more trouble than its worth. and precision by seconds mean little in the grand scheme of our use case --- .../20230605192518_change_session_time_to_be_decimal.rb | 6 ------ db/schema.rb | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 db/migrate/20230605192518_change_session_time_to_be_decimal.rb diff --git a/db/migrate/20230605192518_change_session_time_to_be_decimal.rb b/db/migrate/20230605192518_change_session_time_to_be_decimal.rb deleted file mode 100644 index 287c878..0000000 --- a/db/migrate/20230605192518_change_session_time_to_be_decimal.rb +++ /dev/null @@ -1,6 +0,0 @@ -class ChangeSessionTimeToBeDecimal < ActiveRecord::Migration[7.0] - def change - change_column :classification_events, :session_time, :decimal, :precision => 15, :scale => 10 - change_column :classification_user_groups, :session_time, :decimal, :precision => 15, :scale => 10 - end -end diff --git a/db/schema.rb b/db/schema.rb index 5a8f435..aad03f6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -25,7 +25,7 @@ t.bigint "workflow_id" t.bigint "user_id" t.bigint "user_group_ids", default: [], array: true - t.decimal "session_time", precision: 15, scale: 10 + t.float "session_time" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["event_time"], name: "classification_events_event_time_idx", order: :desc @@ -35,7 +35,7 @@ t.bigint "classification_id" t.datetime "event_time", precision: nil, null: false t.bigint "user_group_id" - t.decimal "session_time", precision: 15, scale: 10 + t.float "session_time" t.bigint "project_id" t.bigint "user_id" t.bigint "workflow_id"