Add migration to change columns type of attachments
As suggested in the paperclip update discussed in the previous commit, we force the type of these fields to be bigint.
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
class ChangeAttachmentSizeFieldsToBigint < ActiveRecord::Migration[5.1]
|
||||||
|
def change
|
||||||
|
change_column :site_customization_images, :image_file_size, :bigint
|
||||||
|
change_column :images, :attachment_file_size, :bigint
|
||||||
|
change_column :documents, :attachment_file_size, :bigint
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20200519120717) do
|
ActiveRecord::Schema.define(version: 20200908084257) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@@ -545,7 +545,7 @@ ActiveRecord::Schema.define(version: 20200519120717) do
|
|||||||
t.string "title"
|
t.string "title"
|
||||||
t.string "attachment_file_name"
|
t.string "attachment_file_name"
|
||||||
t.string "attachment_content_type"
|
t.string "attachment_content_type"
|
||||||
t.integer "attachment_file_size"
|
t.bigint "attachment_file_size"
|
||||||
t.datetime "attachment_updated_at"
|
t.datetime "attachment_updated_at"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.string "documentable_type"
|
t.string "documentable_type"
|
||||||
@@ -641,7 +641,7 @@ ActiveRecord::Schema.define(version: 20200519120717) do
|
|||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.string "attachment_file_name"
|
t.string "attachment_file_name"
|
||||||
t.string "attachment_content_type"
|
t.string "attachment_content_type"
|
||||||
t.integer "attachment_file_size"
|
t.bigint "attachment_file_size"
|
||||||
t.datetime "attachment_updated_at"
|
t.datetime "attachment_updated_at"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.index ["imageable_type", "imageable_id"], name: "index_images_on_imageable_type_and_imageable_id"
|
t.index ["imageable_type", "imageable_id"], name: "index_images_on_imageable_type_and_imageable_id"
|
||||||
@@ -1347,7 +1347,7 @@ ActiveRecord::Schema.define(version: 20200519120717) do
|
|||||||
t.string "name", null: false
|
t.string "name", null: false
|
||||||
t.string "image_file_name"
|
t.string "image_file_name"
|
||||||
t.string "image_content_type"
|
t.string "image_content_type"
|
||||||
t.integer "image_file_size"
|
t.bigint "image_file_size"
|
||||||
t.datetime "image_updated_at"
|
t.datetime "image_updated_at"
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
|
|||||||
Reference in New Issue
Block a user