Extend uploaderip field to cope with IPv6 addresses

This commit is contained in:
Christoph Haas 2021-02-22 11:25:13 +01:00
parent df855cd39b
commit 16b14b1650
2 changed files with 9 additions and 4 deletions

View file

@ -0,0 +1,5 @@
class ExtendIpField < ActiveRecord::Migration[6.1]
def change
change_column :screenshots, :uploaderip, :string, limit: 40
end
end

View file

@ -2,15 +2,15 @@
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `rails
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2020_10_31_112024) do
ActiveRecord::Schema.define(version: 2021_02_22_102040) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -87,7 +87,7 @@ ActiveRecord::Schema.define(version: 2020_10_31_112024) do
t.string "version", limit: 50
t.datetime "created_at"
t.string "uploaderhash", limit: 72
t.string "uploaderip", limit: 15
t.string "uploaderip", limit: 40
t.boolean "approved", default: false, null: false
t.boolean "markedfordelete"
t.string "delete_reason", limit: 100