diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc index 905feb5..ec0fe92 100644 --- a/CHANGELOG.rdoc +++ b/CHANGELOG.rdoc @@ -4,6 +4,7 @@ KalibroProcessor is the processing web service for Mezuro. == Unreleased +* Remove timestamp columns from KalibroModule, ModuleResult, MetricResult and ProcessTime * Transform TreeMetricResult#descendant_values into a single query for performance * Fix possible inconsistency in module result creation (lack of transaction) * Improve acceptance tests by fixing small bugs and adding processing times diff --git a/db/migrate/20160716000521_remove_timestamps_from_module_results.rb b/db/migrate/20160716000521_remove_timestamps_from_module_results.rb new file mode 100644 index 0000000..eadb25b --- /dev/null +++ b/db/migrate/20160716000521_remove_timestamps_from_module_results.rb @@ -0,0 +1,6 @@ +class RemoveTimestampsFromModuleResults < ActiveRecord::Migration + def change + remove_column :module_results, :created_at, :string + remove_column :module_results, :updated_at, :string + end +end diff --git a/db/migrate/20160716000528_remove_timestamps_from_metric_results.rb b/db/migrate/20160716000528_remove_timestamps_from_metric_results.rb new file mode 100644 index 0000000..4401fa0 --- /dev/null +++ b/db/migrate/20160716000528_remove_timestamps_from_metric_results.rb @@ -0,0 +1,6 @@ +class RemoveTimestampsFromMetricResults < ActiveRecord::Migration + def change + remove_column :metric_results, :created_at, :string + remove_column :metric_results, :updated_at, :string + end +end diff --git a/db/migrate/20160716000530_remove_timestamps_from_kalibro_modules.rb b/db/migrate/20160716000530_remove_timestamps_from_kalibro_modules.rb new file mode 100644 index 0000000..e7d2abe --- /dev/null +++ b/db/migrate/20160716000530_remove_timestamps_from_kalibro_modules.rb @@ -0,0 +1,6 @@ +class RemoveTimestampsFromKalibroModules < ActiveRecord::Migration + def change + remove_column :kalibro_modules, :created_at, :string + remove_column :kalibro_modules, :updated_at, :string + end +end diff --git a/db/migrate/20160720183503_remove_timestamps_from_process_times.rb b/db/migrate/20160720183503_remove_timestamps_from_process_times.rb new file mode 100644 index 0000000..45dcf64 --- /dev/null +++ b/db/migrate/20160720183503_remove_timestamps_from_process_times.rb @@ -0,0 +1,6 @@ +class RemoveTimestampsFromProcessTimes < ActiveRecord::Migration + def change + remove_column :process_times, :created_at, :string + remove_column :process_times, :updated_at, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index f576490..e89e753 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20151002172231) do +ActiveRecord::Schema.define(version: 20160720183503) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -33,43 +33,35 @@ add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree create_table "kalibro_modules", force: :cascade do |t| - t.string "long_name", limit: 255 - t.string "granularity", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" - t.integer "module_result_id" + t.string "long_name", limit: 255 + t.string "granularity", limit: 255 + t.integer "module_result_id" end create_table "metric_results", force: :cascade do |t| - t.integer "module_result_id" - t.integer "metric_configuration_id" - t.float "value" - t.datetime "created_at" - t.datetime "updated_at" - t.string "type", default: "MetricResult", null: false - t.integer "line_number" - t.text "message" - t.integer "related_hotspot_metric_results_id" + t.integer "module_result_id" + t.integer "metric_configuration_id" + t.float "value" + t.string "type", default: "MetricResult", null: false + t.integer "line_number" + t.text "message" + t.integer "related_hotspot_metric_results_id" end add_index "metric_results", ["related_hotspot_metric_results_id"], name: "index_metric_results_on_related_hotspot_metric_results_id", using: :btree create_table "module_results", force: :cascade do |t| - t.float "grade" - t.integer "parent_id" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "processing_id" + t.float "grade" + t.integer "parent_id" + t.integer "processing_id" end add_index "module_results", ["parent_id"], name: "index_module_results_on_parent_id", using: :btree create_table "process_times", force: :cascade do |t| - t.string "state", limit: 255 - t.datetime "created_at" - t.datetime "updated_at" - t.integer "processing_id" - t.float "time" + t.string "state", limit: 255 + t.integer "processing_id" + t.float "time" end create_table "processings", force: :cascade do |t| diff --git a/spec/factories/process_times.rb b/spec/factories/process_times.rb index adbdb29..2d11215 100644 --- a/spec/factories/process_times.rb +++ b/spec/factories/process_times.rb @@ -2,7 +2,5 @@ factory :process_time do sequence(:id, 1) state "MyString" - created_at "2014-07-31T08:58:07+00:00" - updated_at "2014-07-31T09:12:01+00:00" end end