This is a part of schema change of wb_terms table (custom table of Wikibase extension).
We would like to know if it would be possible to add empty (all NULLs) column to wb_terms without needing to make Wikidata DB read-only.
https://gerrit.wikimedia.org/r/#/c/341322/1/repo/sql/AddTermsFullEntityId.sql is a draft of the change we want to do.
There will be no code writing to and reading from the new column until the process of adding the column is complete.
**Background:**
General plan for the whole schema change is:Current schema change plan (as suggested by Jaime)
1. Add term_entity_id_s VARBINARY(32) to wb_terms. All values NULLCreate a new column with new indexes
2. Populate term_entity_id_s based on existing data in wb_termsnew column at the same time than the current one (ideally with code, but if you do not want to touch code, it can even be made with a trigger) + populate old values with maintenance
3. Create index on term_entity_sDeploy the new code using only the new column
4. Create index on term_language, term_entity_id_s, term_type, term_search_key(16)
5. Drop old column term_entity_id from wb_terms.
6.At some point in the future, Rename term_entity_id_s to term_entity_iddrop the old column (it can be made all null and it will save space already) -low priority