Modify `vs_code_settings` table schema
MR: Update vs_code_settings table schema (!171582 - merged)
Description
With the introduction of the extensions marketplace context within Settings Sync, there are several changes to be made to the table schema:
- We want to store the
settings_context_hashin thevs_code_settingstable in order to lookup extension settings based on the extensions marketplace context. This field will be a null-able string with a max character limit of 255. - Currently, there is a unique index on the
user_idandsettings_typefields. This constraint is no longer true as we introduce multiple records for each user and setting type. In the context of this epic, a user can now have multipleextensionsrecords with differentsettings_context_hash.- We'll want to confirm with a DB maintainer in the MR for preference on whether we should add an index at all. If we need an index, confirm if an index on the
user_idfield would suffice.
- We'll want to confirm with a DB maintainer in the MR for preference on whether we should add an index at all. If we need an index, confirm if an index on the
Acceptance Criteria
-
Migration to add new column to vs_code_settingstable. -
Add uniqueness validation in the VSCodeSettingmodel. -
Migration to update current unique index to include settings_context_hashto enforce uniqueness at the database level. Here's an example.
Edited by Cindy Halim