wiki.techinc.nl/maintenance/abstractSchemaChanges/patch-user_properties-rename-index.json

60 lines
2.2 KiB
JSON
Raw Normal View History

{
"comment": "Rename user_properties_property index to up_property (T270033)",
"before": {
"name": "user_properties",
"comment": "User preferences and perhaps other fun stuff. :) Replaces the old user.user_options blob, with a couple nice properties: 1) We only store non-default settings, so changes to the defaults are now reflected for everybody, not just new accounts. 2) We can more easily do bulk lookups, statistics, or modifications of saved options since it's a sane table structure.",
"columns": [
{
"name": "up_user",
"comment": "Foreign key to user.user_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "up_property",
"comment": "Name of the option being saved. This is indexed for bulk lookup.",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "up_value",
"comment": "Property value as a string.",
"type": "blob",
"options": { "length": 65530, "notnull": false }
}
],
"indexes": [
{ "name": "user_properties_property", "columns": [ "up_property" ], "unique": false }
],
"pk": [ "up_user", "up_property" ]
},
"after": {
"name": "user_properties",
"comment": "User preferences and perhaps other fun stuff. :) Replaces the old user.user_options blob, with a couple nice properties: 1) We only store non-default settings, so changes to the defaults are now reflected for everybody, not just new accounts. 2) We can more easily do bulk lookups, statistics, or modifications of saved options since it's a sane table structure.",
"columns": [
{
"name": "up_user",
"comment": "Foreign key to user.user_id",
"type": "integer",
"options": { "unsigned": true, "notnull": true }
},
{
"name": "up_property",
"comment": "Name of the option being saved. This is indexed for bulk lookup.",
"type": "binary",
"options": { "length": 255, "notnull": true }
},
{
"name": "up_value",
"comment": "Property value as a string.",
"type": "blob",
"options": { "length": 65530, "notnull": false }
}
],
"indexes": [
{ "name": "up_property", "columns": [ "up_property" ], "unique": false }
],
"pk": [ "up_user", "up_property" ]
}
}