From 515005112f81274525be98d8014f269f3d164513 Mon Sep 17 00:00:00 2001 From: Kohei Suzuki Date: Wed, 4 Oct 2023 15:11:42 +0900 Subject: [PATCH] Upgrade Rails to 6.1 --- kuroko2.gemspec | 2 +- spec/dummy/config/application.rb | 2 +- spec/dummy/db/schema.rb | 52 ++++++++++++++++---------------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/kuroko2.gemspec b/kuroko2.gemspec index 100f77cd..c2142068 100644 --- a/kuroko2.gemspec +++ b/kuroko2.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md", "bin/*.rb"] s.test_files = Dir["spec/**/*"] - s.add_dependency "rails", ">= 6.0.6.1", '< 6.1' + s.add_dependency "rails", ">= 6.1.7.6", '< 7.0' s.add_dependency "kaminari" s.add_dependency "chrono" s.add_dependency "hashie" diff --git a/spec/dummy/config/application.rb b/spec/dummy/config/application.rb index dd75e4c8..b17169cd 100644 --- a/spec/dummy/config/application.rb +++ b/spec/dummy/config/application.rb @@ -8,7 +8,7 @@ module Dummy class Application < Rails::Application - config.load_defaults 6.0 + config.load_defaults 6.1 # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. diff --git a/spec/dummy/db/schema.rb b/spec/dummy/db/schema.rb index a31c09de..6c170c06 100644 --- a/spec/dummy/db/schema.rb +++ b/spec/dummy/db/schema.rb @@ -2,17 +2,17 @@ # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). +# 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: 34) do - create_table "admin_assignments", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "admin_assignments", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.bigint "user_id", null: false t.bigint "job_definition_id", null: false t.datetime "created_at" @@ -20,7 +20,7 @@ t.index ["user_id", "job_definition_id"], name: "user_id", unique: true end - create_table "execution_histories", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "execution_histories", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.string "hostname", limit: 180 t.integer "worker_id", limit: 1 t.string "queue", limit: 180, default: "@default", null: false @@ -32,7 +32,7 @@ t.index ["worker_id", "started_at"], name: "index_execution_histories_on_worker_id_and_started_at" end - create_table "executions", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "executions", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.string "uuid", limit: 36, null: false t.bigint "job_definition_id" t.integer "job_definition_version" @@ -42,7 +42,7 @@ t.text "shell", null: false t.text "context", null: false t.integer "pid" - t.text "output", limit: 4294967295 + t.text "output", size: :long t.integer "exit_status", limit: 2 t.integer "term_signal", limit: 1 t.datetime "started_at" @@ -56,7 +56,7 @@ t.index ["started_at"], name: "started_at" end - create_table "job_definition_tags", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "job_definition_tags", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.bigint "job_definition_id", null: false t.integer "tag_id", null: false t.datetime "created_at", null: false @@ -65,7 +65,7 @@ t.index ["tag_id"], name: "job_definition_tags_tag_id" end - create_table "job_definitions", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "job_definitions", charset: "utf8mb4", force: :cascade do |t| t.integer "version", default: 0, null: false t.string "name", limit: 180, null: false t.text "description", null: false @@ -84,7 +84,7 @@ t.index ["name"], name: "name" end - create_table "job_instances", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "job_instances", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.bigint "job_definition_id" t.integer "job_definition_version" t.text "script" @@ -98,7 +98,7 @@ t.index ["job_definition_id"], name: "index_job_instances_on_job_definition_id" end - create_table "job_schedules", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "job_schedules", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.bigint "job_definition_id" t.string "cron", limit: 180 t.datetime "created_at" @@ -106,7 +106,7 @@ t.index ["job_definition_id", "cron"], name: "kuroko2_schedules_definition_id_cron_idx", unique: true end - create_table "job_suspend_schedules", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "job_suspend_schedules", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.bigint "job_definition_id" t.string "cron", limit: 180 t.datetime "created_at", null: false @@ -114,16 +114,16 @@ t.index ["job_definition_id", "cron"], name: "kuroko2_suspend_schedules_definition_id_cron_idx", unique: true end - create_table "logs", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "logs", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.integer "job_instance_id" t.string "level", limit: 10 - t.text "message", limit: 4294967295 + t.text "message", size: :long t.datetime "created_at" t.datetime "updated_at" t.index ["job_instance_id"], name: "job_instance_id" end - create_table "memory_consumption_logs", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "memory_consumption_logs", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.integer "job_instance_id" t.integer "value", null: false t.datetime "created_at", null: false @@ -131,7 +131,7 @@ t.index ["job_instance_id"], name: "index_memory_consumption_logs_on_job_instance_id" end - create_table "memory_expectancies", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "memory_expectancies", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.integer "expected_value", default: 0, null: false t.bigint "job_definition_id" t.datetime "created_at", null: false @@ -139,7 +139,7 @@ t.index ["job_definition_id"], name: "index_memory_expectancies_on_job_definition_id" end - create_table "process_signals", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "process_signals", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.string "hostname", limit: 180, default: "", null: false t.integer "pid", null: false t.integer "number", limit: 1, default: 15, null: false @@ -152,7 +152,7 @@ t.index ["hostname", "started_at"], name: "hostname_started_at" end - create_table "script_revisions", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "script_revisions", charset: "utf8mb4", force: :cascade do |t| t.bigint "job_definition_id", null: false t.text "script", null: false t.bigint "user_id" @@ -163,7 +163,7 @@ t.index ["user_id"], name: "index_script_revisions_on_user_id" end - create_table "stars", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "stars", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.bigint "user_id", null: false t.bigint "job_definition_id", null: false t.datetime "created_at" @@ -171,18 +171,18 @@ t.index ["user_id", "job_definition_id"], name: "index_stars_on_user_id_and_job_definition_id", unique: true end - create_table "tags", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "tags", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.string "name", limit: 100, null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false t.index ["name"], name: "index_tags_on_name", unique: true end - create_table "ticks", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "ticks", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.datetime "at" end - create_table "tokens", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "tokens", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.string "uuid", limit: 36, null: false t.bigint "job_definition_id" t.integer "job_definition_version" @@ -199,7 +199,7 @@ t.index ["status"], name: "status" end - create_table "users", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "users", charset: "utf8mb4", force: :cascade do |t| t.string "provider", limit: 180, default: "google_oauth2", null: false t.string "uid", limit: 180, null: false t.string "name", limit: 180, default: "", null: false @@ -215,7 +215,7 @@ t.index ["uid"], name: "uid", unique: true end - create_table "workers", id: :integer, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" do |t| + create_table "workers", id: :integer, charset: "utf8mb4", force: :cascade do |t| t.string "hostname", limit: 180, null: false t.integer "worker_id", limit: 1, null: false t.string "queue", limit: 180, default: "@default", null: false