From 41d931aba0c56d3ec82a8affa6d80b3f502dd544 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Tue, 17 May 2022 16:45:17 +0200 Subject: [PATCH] Fix a bug: Missing of description of PlanCategory migration --- CHANGELOG.md | 1 + app/models/plan_category.rb | 2 +- .../20220517140916_add_description_to_plan_category.rb | 5 +++++ db/schema.rb | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20220517140916_add_description_to_plan_category.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 992c36ba7..00100da05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Fix a bug: when machines module disabled, Associated machines is still shown in trainings list - Fix a bug: script mount-proof-of-identity-files unable to modify docker-compose.yml - Fix a bug: Event reservation calendar encoding in mail +- Fix a bug: Missing of description of PlanCategory migration ## v5.4.0 2022 May 12 diff --git a/app/models/plan_category.rb b/app/models/plan_category.rb index cf4d11e0d..6c8633883 100644 --- a/app/models/plan_category.rb +++ b/app/models/plan_category.rb @@ -6,5 +6,5 @@ # - plan_category # - plan class PlanCategory < ApplicationRecord - has_many :plan, dependent: :nullify + has_many :plans, dependent: :nullify end diff --git a/db/migrate/20220517140916_add_description_to_plan_category.rb b/db/migrate/20220517140916_add_description_to_plan_category.rb new file mode 100644 index 000000000..223c34b07 --- /dev/null +++ b/db/migrate/20220517140916_add_description_to_plan_category.rb @@ -0,0 +1,5 @@ +class AddDescriptionToPlanCategory < ActiveRecord::Migration[5.2] + def change + add_column :plan_categories, :description, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index dfff7c3fd..b49a86421 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2022_05_09_105714) do +ActiveRecord::Schema.define(version: 2022_05_17_140916) do # These are extensions that must be enabled in order to support this database enable_extension "fuzzystrmatch" @@ -1021,8 +1021,8 @@ ActiveRecord::Schema.define(version: 2022_05_09_105714) do t.boolean "is_allow_newsletter" t.inet "current_sign_in_ip" t.inet "last_sign_in_ip" - t.string "mapped_from_sso" t.datetime "validated_at" + t.string "mapped_from_sso" t.index ["auth_token"], name: "index_users_on_auth_token" t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true t.index ["email"], name: "index_users_on_email", unique: true