An issue occurred during the upgrade process

Team,

I was trying to upgrade the Metabase version from 0.46.2 to 0.50.27. However, due to the resource issue degradation failed and when I tried again the service threw the following error

ERROR middleware.log :: [31mPOST /api/dashboard/12/dashcard/75/card/8/query 500 23.8 ms (8 DB calls) 
{:via
 [{:type clojure.lang.ExceptionInfo,
   :message "ERROR: column report_card.dataset does not exist\n  Position: 168",
   :data
   {:toucan2/context-trace
    [["execute SQL with class com.mchange.v2.c3p0.impl.NewProxyConnection"
      {:toucan2.jdbc.query/sql-args
       ["SELECT \"report_card\".\"id\", \"report_card\".\"name\", \"report_card\".\"dataset_query\", \"report_card\".\"database_id\", \"report_card\".\"cache_ttl\", \"report_card\".\"collection_id\", \"report_card\".\"dataset\", \"report_card\".\"result_metadata\" FROM \"report_card\" WHERE \"id\" = ?"
        8]}]
     ["resolve connection" {:toucan2.connection/connectable metabase.db.connection.ApplicationDB}]
     ["resolve connection" {:toucan2.connection/connectable :default}]
     ["resolve connection" {:toucan2.connection/connectable nil}]
     {:toucan2.pipeline/rf
      #object[clojure.core$map$fn__5931$fn__5932 0x3898ba9 "clojure.core$map$fn__5931$fn__5932@3898ba9"]}
     ["with compiled query"
      {:toucan2.pipeline/compiled-query
       ["SELECT \"report_card\".\"id\", \"report_card\".\"name\", \"report_card\".\"dataset_query\", \"report_card\".\"database_id\", \"report_card\".\"cache_ttl\", \"report_card\".\"collection_id\", \"report_card\".\"dataset\", \"report_card\".\"result_metadata\" FROM \"report_card\" WHERE \"id\" = ?"
        8]}]
     ["with built query"
      {:toucan2.pipeline/built-query
       {:select
        [:report_card/id
         :report_card/name
         :report_card/dataset_query
         :report_card/database_id
         :report_card/cache_ttl
         :report_card/collection_id
         :report_card/dataset
         :report_card/result_metadata],
        :from [[:report_card]],
        :where [:= :id 8]}}]
     ["with resolved query" {:toucan2.pipeline/resolved-query {}}]
     ["with parsed args"
      {:toucan2.pipeline/query-type :toucan.query-type/select.instances,
       :toucan2.pipeline/parsed-args
       {:kv-args {:id 8},
        :columns [:id :name :dataset_query :database_id :cache_ttl :collection_id :dataset :result_metadata],
        :queryable 
{}
}}]
     ["with model" {:toucan2.pipeline/model :metabase.models.card/Card}]
     ["with unparsed args"
      {:toucan2.pipeline/query-type :toucan.query-type/select.instances,
       :toucan2.pipeline/unparsed-args
       ([:metabase.models.card/Card
         :id
         :name
         :dataset_query
         :database_id
         :cache_ttl
         :collection_id
         :dataset
         :result_metadata]
        :id
        8)}]]},
   :at [org.postgresql.core.v3.QueryExecutorImpl receiveErrorResponse "QueryExecutorImpl.java" 2676]}
  {:type org.postgresql.util.PSQLException,

It seems like the first container altered the table and was killed due to 100% CPU but when the process started again it was not able to find that specific column[dataset]

Further, I have altered(created) the table and was able to upgrade the Metabase version.

I have the following questions

Why does Metabase need extra resources during the upgrade process?
Why did Metabase first alter the table and the second time was unable to find the dataset column?

Seems like a non finished migration, can you re run those?