Closed nosnilmot closed 1 year ago
Great work, all those patches looks ok to me.
@nosnilmot can you draft an upgrade docs PR with what this entails for existing installs?
You need this for the next release anyway, 23.0x, but I'd like to keep up with ejabberd HEAD and I'm not brave enough to update past this PR as I don't know if "it wil magically work out" or break my schema.
Albeit your next (unmerged) PR mentions "autoupgrades" which sound nice but might not yet be active/usable.
@nosnilmot can you draft an upgrade docs PR with what this entails for existing installs?
You need this for the next release anyway, 23.0x, but I'd like to keep up with ejabberd HEAD and I'm not brave enough to update past this PR as I don't know if "it wil magically work out" or break my schema.
Can I suggest you read the bit in the description of this PR after the words "The notes below can be used to apply these changes to existing databases." :smile:
For the most part you don't strictly need to do anything, everything will just keep working (or, in the case of MS SQL, not working) in exactly the same way as before. If you want the benefits from this PR for an existing installation you need to make the DB schema changes documented.
Albeit your next (unmerged) PR mentions "autoupgrades" which sound nice but might not yet be active/usable.
Nope, no "autoupgrades" there, automated testing of schema upgrades (ie. GitHub workflow).
Ah silly me, that flew above my head, indeed, will do. Thanks
@nosnilmot: Good job!
Various (mostly) SQL related fixes and updates
These changes may be more easily reviewed by commit, as each is self-contained. If preferred I can submit separately, although there is some ordering required.
mqtt_pub
table (refs #3097)server_host
column onroute
table already exists in old schema and does not need adding for new schema migration.sql_ssl
option, and allow custom ODBC connection string specification insql_server
(refs #3978)The notes below can be used to apply these changes to existing databases.
Database Updates
PostgreSQL
Regular or New schema:
To convert columns to allow up to 2 billion rows in these tables. This conversion will require full table rebuilds, and will take a long time if tables already have lots of rows. Optional: this is not necessary if the tables are never likely to grow large.
PostgreSQL or SQLite
Regular schema:
New schema:
Add index that might be missing
PostgreSQL:
SQLite:
MySQL
Regular schema:
New schema:
Add index that might be missing:
MS SQL
MS SQL schema was missing some tables added in earlier versions of ejabberd:
MS SQL also had some incompatible column types:
... and
mqtt_pub
table was incorrectly defined in old schema:... and
sr_group
index/PK was inconsistent with other DBs: