Help with Rails console to edit text template

It was enough of a pointer, and I also found the bug (which is in the ruby code):

to=TranslationOverride.where(translation_key:"user_notifications.user_watching_category_or_tag.text_body_template").first
to.value="%{username} posted in \"[%{topic_title}](%{base_url}%{url})\"\n\n--"
to.save!
ActiveRecord::RecordInvalid: Validation failed: The following interpolation key is invalid: base_url
from /var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/validations.rb:80:in `raise_validation_error'

validations.rb is the culprit … base_url is valid, and does get parsed just fine (as I explained in the linked thread). It seems I either need to hack validations.rb (ugh!) or edit the SQL database directly (which is what I had after the upgrade) … so now I need to find where in the postgre database these template tags live :frowning:

p.s. It’s such an easy and quick fix though for the devs (I could do a PR but I only know a subset of tags where %{base_url} is missing from the valid tags)