Commit 87ad97c1 authored by Stan Hu's avatar Stan Hu

Fix bug where files over 2 GB would not be saved in Geo tracking DB

If an LFS file were over 2 GB, Sidekiq would fail with a message such as:

```
2917923200 is out of range for ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Integer with limit 4
```

To fix, increase the value in the database from a 4-byte integer to a 8-byte integer.
parent 211679e2
---
title: Fix bug where files over 2 GB would not be saved in Geo tracking DB
merge_request:
author:
class ConvertFileBytesToInt64 < ActiveRecord::Migration
def change
change_column :file_registry, :bytes, :integer, limit: 8
end
end
......@@ -11,14 +11,15 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170302005747) do
ActiveRecord::Schema.define(version: 20170526214010) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "file_registry", force: :cascade do |t|
t.string "file_type", null: false
t.integer "file_id", null: false
t.integer "bytes"
t.integer "bytes", limit: 8
t.string "sha256"
t.datetime "created_at", null: false
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment