After update can't revert questions back to pre .46 version

Hi All, Hi metabase team

Just updated to the latest version (we had 1.44 before). We have a self-hosted version of metabase.

After the update we noticed that we can no longer revert saved sql questions to a version that was saved before the update. When clicking on the revert arrow icon in the query editor, nothing happens. In the logs we noticed some error messages though:

POST /api/revision/revert 500 40.0 ms (15 DB calls) 
 [{:type clojure.lang.ExceptionInfo,
   :message "ERROR: column \"is_write\" of relation \"report_card\" does not exist\n  Position: 196",
    [["execute SQL with class com.mchange.v2.c3p0.impl.NewProxyConnection"
       ["UPDATE \"report_card\" SET \"table_id\" = NULL, \"result_metadata\" = NULL, \"database_id\" = ?, \"query_type\" = ?, \"updated_at\" = NOW(), \"dataset_query\" = ?, \"id\" = ?, \"visualization_settings\" = ?, \"is_write\" = FALSE WHERE \"id\" = ?"
        12   // the database id
        "{\"database\":12,\"native\":{\"template-tags\":{},\"query\": /"/* here is the old query that should be restored*/ /" },\"type\":\"native\"}"
        12345  //the question id
        {/*some visualization_settings of the old version*/}
        12345//the question id
// ... a lot of other stuff for another 1000 lines, can provide more details if needed

So it seems the the is_write column is no longer present in the report_card table, but the revert endpoint still refers to it when trying to revert to an old, pre .46 (or possibly pre .45?) version.

When we try to revert to a version that was done after the update, all seems to be working fine, but we don't see much details in the logs except the that the call to revert endpoint return 200.

Can you advise? Is there something that we can/should/forgot to do on our end during the update?

You’re seeing Reverting a question to a revision prior to Metabase upgrade 0.46 does not work · Issue #31901 · metabase/metabase · GitHub, if you’re a paid customer please write to our support email

1 Like