Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
42 changes: 17 additions & 25 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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|
Expand Down
2 changes: 0 additions & 2 deletions spec/factories/process_times.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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