Fix dav properties column types
Summary
- First commit changes column
propertyvaluefromTEXTtype toBLOBas it may contain null 0x00 characters because of php serialization #37754- after removing all serialized data (that have very good chances to be invalid)
- by creating a new temporary column
- moving data to it
- dropping the old column
- adding a new column with the right type
- moving data to it
- resetting not null on the new column
- dropping the temporary column
- Second one increases simply
propertypathcolumn length #9907
If changing the type of the column can't be done, we'll need to create a new column and move data
TODO
- [x] SQLite is accepting pretty much anything ✅
- [x] MySQL/MariaDB ✅ just needs the index to be on a prefix
- [x] Test on PostgreSQL ❌ (needs some cast magic)
- [x] Test on Oracle ❌ (is being Oracle)
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [ ] Screenshots before/after for front-end changes
- [ ] Documentation (manuals or wiki) has been updated or is not required
- [ ] Backports requested where applicable (ex: critical bugfixes)
@skjnldsv This one is important and I need some help on the database migration.
Any chance this PR get's some love?
For PostgreSQL : https://stackoverflow.com/questions/19300113/unable-to-convert-postgresql-text-column-to-bytea For Oracle : https://asktom.oracle.com/ords/f?p=100:11:::::P11_QUESTION_ID:510622111991
If we have less than 50k rows (value yet to determine), perform the migrations straight away. Otherwise, skip the migration, set an appconfig and add a red flag in system check. Then include as an expensive repair step.
Fixed through https://github.com/nextcloud/server/pull/49528