DEV: Change uploads.filesize column to bigint (#14334)

This is necessary to allow for large file uploads via
the direct S3 upload mechanism, as we convert the external
file to an Upload record via ExternalUploadManager once
it is complete.

This will allow for files larger than 2,147,483,647 bytes (2.14GB)
to be referenced in the uploads table.

This is a table locking migration, but since it is not as highly
trafficked as posts, topics, or users, the disruption should be minimal.
This commit is contained in:
Martin Brennan 2021-09-14 12:20:56 +10:00 committed by GitHub
parent 527351cb56
commit 581482003a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -513,7 +513,7 @@ end
# id :integer not null, primary key
# user_id :integer not null
# original_filename :string not null
# filesize :integer not null
# filesize :bigint not null
# width :integer
# height :integer
# url :string not null

View File

@ -0,0 +1,7 @@
# frozen_string_literal: true
class ChangeUploadsFilesizeToBigint < ActiveRecord::Migration[6.1]
def change
change_column :uploads, :filesize, :bigint
end
end