Ruth Ivimey-Cook writes:
Is there any way to get a copy of the mysql/mariadb table schema that I can then pour the existing data into (i.e. I don't want to reinitialise the db)?
I suspect you alread know this, but the backend database schema is entirely implicit in the SQLAlchemy models. There is no function in Mailman to dump out the backend schema, although SQLAlchemy may have one. AAAAaaaannnnddd ... bingo!
https://docs.sqlalchemy.org/en/14/faq/metadata_schema.html#how-can-i-get-the...
Don't know if that does what you need, but it's the best I can come up with without reading tons of code. :-) There's probably a similar function that allows you to dump all the data in an SQLAlchemy-specific format that you can load back in to a different backend and SQLAlchemy will do the schema translation.
Also, have you considered that Django keeps an independent set of tables for HyperKitty and/or Postorius? Same comments apply, except that Django has its own ORM.
https://docs.djangoproject.com/en/3.2/ref/django-admin/#dumpdata
Finally, don't the backend databases have some sort of "dump schema" command? That might be more useful. Note that I got lucky (yay, Google-fu!) with "DBM dump schema" on the first try so "dump" seems to be the right search term.