aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert2017-11-30 19:12:11 +0100
committerRobert2017-11-30 19:12:11 +0100
commitf98cd834d37b007ca8f30c48d8694e1f669f32a3 (patch)
tree0ab4c5026e2f998dc4893129c99586df7d72e3f7
parenta2896b1db4db22eef587c2ae801c7a0d393c729f (diff)
downloadchouette-core-f98cd834d37b007ca8f30c48d8694e1f669f32a3.tar.bz2
Fixes: #5130@0.5h; Added a quickfix for incorrect item_id type in versions5130-del_fk_compliance_ctrl_set_in_compliance_check_sets
-rw-r--r--db/migrate/20171130180144_change_item_id_in_versions_to_bigint.rb8
-rw-r--r--db/schema.rb8
-rw-r--r--spec/db/schema_spec.rb2
3 files changed, 13 insertions, 5 deletions
diff --git a/db/migrate/20171130180144_change_item_id_in_versions_to_bigint.rb b/db/migrate/20171130180144_change_item_id_in_versions_to_bigint.rb
new file mode 100644
index 000000000..b1e6ca0a6
--- /dev/null
+++ b/db/migrate/20171130180144_change_item_id_in_versions_to_bigint.rb
@@ -0,0 +1,8 @@
+class ChangeItemIdInVersionsToBigint < ActiveRecord::Migration
+ def up
+ change_column :versions, :item_id, :integer, limit: 8, null: false
+ end
+ def down
+ change_column :versions, :item_id, :integer, null: false
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index af22672c6..c6c3bef7e 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: 20171130172926) do
+ActiveRecord::Schema.define(version: 20171130180144) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -950,9 +950,9 @@ ActiveRecord::Schema.define(version: 20171130172926) do
add_index "vehicle_journeys", ["route_id"], name: "index_vehicle_journeys_on_route_id", using: :btree
create_table "versions", id: :bigserial, force: :cascade do |t|
- t.string "item_type", null: false
- t.integer "item_id", null: false
- t.string "event", null: false
+ t.string "item_type", null: false
+ t.integer "item_id", limit: 8, null: false
+ t.string "event", null: false
t.string "whodunnit"
t.text "object"
t.datetime "created_at"
diff --git a/spec/db/schema_spec.rb b/spec/db/schema_spec.rb
index a7fe0a162..585636124 100644
--- a/spec/db/schema_spec.rb
+++ b/spec/db/schema_spec.rb
@@ -44,6 +44,6 @@ Diff: #{diff}
def diff
RSpec::Support::Differ.new(
color: RSpec::Matchers.configuration.color?
- ).diff_as_string(@original, @expected)
+ ).diff_as_string(@expected, @original)
end
end