From f2afe5008f769e1d6face37317af5870725d3716 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Thu, 13 Jul 2023 18:39:48 +0200 Subject: [PATCH] chore(schema): remove dossier_corrections#kind, replaced in 5998cf --- app/models/dossier_correction.rb | 2 -- .../20230713163641_remove_dossier_corrections_kind.rb | 7 +++++++ db/schema.rb | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20230713163641_remove_dossier_corrections_kind.rb diff --git a/app/models/dossier_correction.rb b/app/models/dossier_correction.rb index c2ff19b13..77dcdbf66 100644 --- a/app/models/dossier_correction.rb +++ b/app/models/dossier_correction.rb @@ -14,8 +14,6 @@ class DossierCorrection < ApplicationRecord belongs_to :dossier belongs_to :commentaire - self.ignored_columns += ['kind'] - validates_associated :commentaire scope :pending, -> { where(resolved_at: nil) } diff --git a/db/migrate/20230713163641_remove_dossier_corrections_kind.rb b/db/migrate/20230713163641_remove_dossier_corrections_kind.rb new file mode 100644 index 000000000..2b387513c --- /dev/null +++ b/db/migrate/20230713163641_remove_dossier_corrections_kind.rb @@ -0,0 +1,7 @@ +class RemoveDossierCorrectionsKind < ActiveRecord::Migration[7.0] + def change + safety_assured do + remove_column :dossier_corrections, :kind, :string, default: 'incorrect', null: false + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 675a76a15..4f486cfdc 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[7.0].define(version: 2023_07_19_112020) do +ActiveRecord::Schema[7.0].define(version: 2023_07_18_113920) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -336,7 +336,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_07_19_112020) do t.bigint "dossier_id", null: false t.datetime "resolved_at", precision: 6 t.datetime "updated_at", precision: 6, null: false - t.string "kind", default: "correction", null: false t.string "reason", default: "incorrect", null: false t.index ["commentaire_id"], name: "index_dossier_corrections_on_commentaire_id" t.index ["dossier_id"], name: "index_dossier_corrections_on_dossier_id"